List Info

Thread: żleak




żleak
user name
2007-01-05 21:57:58
I put in my first email the example that 'leaks'. I am afraid I am assuming something, but I have not seen any good example.
The source file I took in order to do my implementation was the test 'pushSAXhtml.py ' that comes with the distribution.

The only thing that is done in that example about the release of resources  is: 'ctxt = None'.
I have tried to use the following functions:

ctxt.htmlFreeParserCtxt ()
ctxt.clearParserCtxt()

And I get segment violations.



On 1/5/07, John Dennis < jdennisredhat.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jdennisredhat.com> wrote:
On Fri, 2007-01-05 at 17:21 +0100, Cesar Ortiz wrote:
>; Hi,
>
&gt; Maybe the top is fooling me, but after 10 minutes of execution (the
> example I attached with an infinite loop) it took half of the machine
&gt; memory (2 Gbs of a 4Gbs Linux Box), and later the process crashed due
> to a 'Memory Error'.
>
> I am pretty sure libxml2 does not leak, but may be there is something
> wrong with the python bindings, or may be I am forgetting something.

Are you calling freeDoc, freeNode, xpathFreeContext, etc. or are you
blindly assuming the python bindings are doing this for you?
--
John Dennis < jdennisredhat.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> jdennisredhat.com >



[1]

about | contact  Other archives ( Real Estate discussion Medical topics )