[Python-bugs-list] [Bug #128079] memory leak in pyexpat parser
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 10 Jan 2001 08:03:59 -0800
Bug #128079, was updated on 2001-Jan-08 12:09
Here is a current snapshot of the bug.
Project: Python
Category: XML
Status: Closed
Resolution: Invalid
Bug Group: Not a Bug
Priority: 5
Submitted by: nobody
Assigned to : fdrake
Summary: memory leak in pyexpat parser
Details: Hi,
I am having a problem with memroy when I am running a python program which
has a code similar to this.
from xml.dom import minidom
while 1:
doc = minidom.parse('text.xml')
print doc
del doc
The memory size keeps incrementing as the loop is executed.This is the
text.xml file
<?xml version="1.0"?>
<Nesim>
<config>
<port>50008</port>
<Sustained-alarm-rate>10</Sustained-alarm-rate>
<Burst-alarm-rate>10</Burst-alarm-rate>
<Burst-duration>10</Burst-duration>
<Burst-frequency>10</Burst-frequency>
</config>
</Nesim>
I am trying to delete it manually even then the memory size is increasing.
Please I need some help .
Thanks
kishore
Follow-Ups:
Date: 2001-Jan-10 08:03
By: fdrake
Comment:
This has to do with minidom, not pyexpat. minidom creates internal
circular references which need to be cleared by calling the .unlink()
method on the document object. See the development copy of the
documentation for more information:
http://python.sourceforge.net/devel-docs/lib/module-xml.dom.minidom.html
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=128079&group_id=5470