[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] libxml memory leak ?
- From: Tim Van Holder <tim vanholder anubex com>
- To: christophe barbe <cbarbe obj-sys com>
- Cc: xml gnome org
- Subject: Re: [xml] libxml memory leak ?
- Date: Mon, 31 Jul 2006 08:19:51 +0200
christophe barbe wrote:
> Thanks Mike,
>
> I was not expecting to have to do that as I was not parsing any document
> but it fixes the memory leak.
>
> Christophe
>
> On Fri, 2006-07-28 at 23:14 +0200, Mike Hommey wrote:
>> On Fri, Jul 28, 2006 at 02:25:41PM -0400, christophe barbe <cbarbe obj-sys com> wrote:
>>> Hi All,
>>>
>>> I was tracking a memory leak and ended up with a very simple libxml
>>> program that leaks according to valgrind (I reproduced it with libxml
>>> 2.6.26).
>>> Could someone, please, have a look at the attached c file and tell me if
>>> I am doing something wrong? If not, I will create a bug report for it.
>>> The valgrind report is also attached.
>> You want to add a call to xmlCleanupParser() at the end of your
>> program.
>>
>> Mike
Also note that it is not technically a leak, as the memory is still
reachable. You would have the same effect using a flex scanner in a
program - it allocates a buffer on first use, which is never
automagically cleaned up (but it's reused each call to the scanner).
There is no pressing need to 'fix' these in a standalone program
(although if it's as easy to resolve as in this case, it is of course
nice to get a clean bill of health from valgrind).
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]