Re: [xml] Memory leaks in libxml 1.7.2

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Thu Nov 25 1999 - 05:31:54 EST


On Wed, Nov 24, 1999 at 07:45:17AM -0500, Daniel Veillard wrote:
> On Wed, Nov 24, 1999 at 01:15:15PM +0100, Andrea LUCIANO wrote:
> > There are memory leaks in libxml 1.7.2 (in encoding.c allocating space for handler, line 391 420).
> > Are they fixed in later versions?
>
> Well this is well known, and basically this memory is allocated
> when initializing the global encoding infrastructure for the parser.
> This sums up as 241 bytes, so I negelected it for the moment,
> the proper way to do it would be to provide a cleanup fonction
> to be called at the end of the usage of the XML library.
> I will try to implement it but applications will have to explicitely
> call it at the end of processing ,

  Ok, I have added a new function call to the parser API:
   void xmlCleanupParser (void);
   http://rpmfind.net/veillard/XML/gnome-xml-parser.html#XMLCLEANUPPARSER

its goal is to free the extra memory that was allocated for parsing
processing (independantly of the documents memory). Call it once
you know you won't do anymore parsing in your application. For the moment
it just calls xmlCleanupCharEncodingHandlers() which will free
the encoding handler stucture registered at startup.

 It's commited in the CVS bases.

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux, WWW, rpmfind,
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | rpm2html, XML,
http://www.w3.org/People/W3Cpeople.html#Veillard | badminton, and Kaffe.
----
Message from the list xml@rufus.w3.org
Archived at : http://rufus.w3.org/veillard/XML/messages
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rufus.w3.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:29:53 EDT