[XML-SIG] sax parser leaks memory?

Fredrik Lundh fredrik@effbot.org
Mon, 4 Dec 2000 20:07:58 +0100


on my windows box, this little script runs out of memory
within 30 seconds or so...

import xml.sax, xml.sax.handler

class myHandler(xml.sax.handler.ContentHandler):
    def startElement(self, name, attrs):
        pass # print "START", name, attrs.items()
    def endElement(self, name):
        pass # print "END", name
    def characters(self, content):
        pass # print "DATA", content

while 1:
    p = xml.sax.make_parser()
    p.setContentHandler(myHandler())
    p.feed("<xml>hello</xml>")
    p.close()
    del p

what am I doing wrong?  or is this what I think it is...

</F>