[XML-SIG] [ pyxml-Bugs-604973 ] memory leak in xml.parsers.sgmllib
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 05 Sep 2002 03:02:07 -0700
Bugs item #604973, was opened at 2002-09-05 12:02
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=604973&group_id=6473
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jean-Claude Rimbault (jcrimbault)
Assigned to: Nobody/Anonymous (nobody)
Summary: memory leak in xml.parsers.sgmllib
Initial Comment:
The following short test program is leaking memory:
from xml.parsers.sgmllib import SGMLParser
while 1:
p = SGMLParser()
There is a cross reference cycle between
sgmllib.FastSGMLParser and sgmlop.SGMLParser
which is not detected by the garbage collector.
Breaking the cycle with the following workaround
stops the memory leakage:
while 1:
p = SGMLParser()
p.feed = None
p.parser = None
(environment: PyXML 0.8, Python 2.2.1, Linux 2.4.3)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=604973&group_id=6473