[Zope-dev] XMLDocument Memory Leak

Dean Jenkins dean.jenkins@onexamination.com
Wed, 11 Jul 2001 12:40:26 +0100


I've found a memory leak in the XMLDocument Product by Amos at DC.

I use it for storing and presenting small XML documents (30-40 lines or so)
and do only simple things such as ...

<dtml-in "getElementsByTagName('option')">
<tr><td bgcolor="#cccc99"><dtml-var "text_content()"></td></tr>
</dtml-in>

by 'viewing' the document with a method thus ...

anEMQtobeshown/viewEMQ

I suspected it may be the cause of a memory leak but haven't been able to
trace it until using the LeakFinder product.

The refcounts for

Products.XMLDocument.XMLDocument.Element
Products.XMLDocument.Node.Text

increase and increase until python is using most of my physical memory and
the server grinds to a halt.

http://www.onexamination.com/

I have tried patching the classes as suggested in the LeakFinder useage but
have no results to show.

Anyone else using XMLDocument? Can someone plug the leak?

Dean Jenkins.