help with xml.dom.minidom memory leak

Victor Muslin victor at prodigy.net
Thu May 24 12:30:10 EDT 2001


Sorry. I am using Python 2.0 on Windows 2000.

Looks like Python 2.0 XML implementation may be a problem according to
you. I will install Python 2.1 and see what happens.

Thanks!

On 24 May 2001 17:32:24 +0200, Martin von Loewis
<loewis at informatik.hu-berlin.de> wrote:

>victor at prodigy.net (Victor Muslin) writes:
>
>> Below is a short program that leaks memory. Any ideas how to plug the
>> leak? What am I doing wrong?
>
>What python version? With your exact code, I get a traceback
>
>  File "/usr/local/lib/python1.5/site-packages/xml/dom/minidom.py", line 441, in unlink
>    for attr in self._attrs.values():
>
>since, after unlinking the document, unlinking the DOM fails.
>
>With Python 2.1 and PyXML 0.6.5, on Solaris 8, I cannot reproduce the
>memory leak, nor can I reproduce it with plain Python 2.1 (i.e. no
>PyXML).
>
>In Python 2.0, there was a bug where pyexpat objects where not
>properly deallocated after parsing, and would not be found by the
>garbage collector either.
>
>I recommend either installing PyXML, or updating to Python 2.1.
>
>Regards,
>Martin




More information about the Python-list mailing list