[lxml-dev] memory leak in el.get() ?
Stefan Behnel
behnel_ml at gkec.informatik.tu-darmstadt.de
Sun Feb 5 10:26:48 CET 2006
Scott Haeger wrote:
> I am getting a memory leak using the get attribute method. The
> following will illustrate the problem:
>
> el = etree.Element("element")
> el.set('a', 'first')
>
> while True:
> x = el.get('a')
>
> Memory usage as displayed in top continues will continue to grow.
>
> I am using the following:
> lxml 0.8
> libxml2 2.6.23
> Fedora Core 3
>
> Scott
Hi Scott,
thanks for reporting this. I think you're right, there is a problem with
freeing the string buffer of attribute values after converting them to Python
strings. I'll see if I can fix that and commit a patch to SVN.
Thanks,
Stefan
More information about the lxml-dev
mailing list