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

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

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
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]