New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leakage in SAX with exception #36960
Comments
Trying the following test: #!/usr/bin/python import sys,string,StringIO,traceback,time,gc
import xml.sax,xml.sax.handler
gc.set_debug(gc.DEBUG_SAVEALL)
class SimpleHandler(xml.sax.handler.ContentHandler):
def __init__(self):
pass
def startElement(self,name,attrs):
print 'start ',name
def endElement(self,name):
print 'end ',name
def characters(self,content):
print content
class SimpleErrorHandler(xml.sax.handler.ErrorHandler):
def __init__(self):
pass
def fatalError(self,e):
print e
myHandler=SimpleHandler()
myErrHandler=SimpleErrorHandler()
data='<test>something</>'
while 1:
gc.collect()
print len(gc.garbage)
try:
#xml.sax.parseString(data,myHandler,myErrHandler)
xml.sax.parseString(data,myHandler)
except Exception, e:
sinfo=sys.exc_info()
traceback.print_tb(sinfo[2],None)
time.sleep(1) it seems that lots of object remain uncollectable. Thanks |
Logged In: YES Your analysis of this result is wrong. Instead, the result |
Logged In: YES This is correct, it's my fault, but removing the |
Logged In: YES There might indeed have been a memory leak in Python 2.1.3, |
Logged In: YES Paolo, can you confirm that this bug should be closed? |
Logged In: YES Fixed in 2.3, as the submitter posted. . Facundo |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: