Re: [xml] hi.. Regarding memory leak.

On Thu, Jun 27, 2002 at 03:35:12PM +1000, Sundaram wrote:
hi Daniel,

I encountered memory leaks while using gnome.

In my program, i was generating reports in xml format.
I open an existing xml file , save as another xml file after updating fields.

But, before that  
while i called the function which generates xml file, in a for loop
 the memory was not freed properly.

i could see the size of the process getting increased (ps -el   in solaris (ver 5.8))

  This is not a proper way to measure memory usage.

The  memory is released only when the program terminates.
though i have  used xmlFreeDoc()  &  xmlCleanupParser() at the end of function.

  using xmlCleanupParser in a loop is a serious mistake. only once at
the end of the use of the library.

i have attached source file and related DTD,XML files with this mail.

  Sorry I don't debug the code of users of my library, I don't scale.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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