Re: [xml] Could you explain me?



On Tue, Sep 11, 2007 at 12:36:08PM +0200, Marco Spinetti wrote:
In this module I see that when a child start, in its init function, it's
called:

xmlInitParser();
xmlInitThreads();
exsltRegisterAll();

so these functions are called once per child.
When a user request is served, the handler of the module is called,
which replies to the client.
Well, in this hanlder they use libxml2/libxslt functions and the never
calls xmlCleanupParser() or xsltCleanupGlobals().
Is it right?
I suppose that it's right because xmlCleanupParser() should be called
once at the end of the use of libxml2 library.
But they never calls it and I'd like to know if it's ok or not.

  It's okay. Because the (small) amount of memory still used by 
libxml2 will be recollected by the Operating System once the child
process exits. Calling xmlCleanupParser/xsltCleanupGlobals there is
more dangerous than useful.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]