help with xml.dom.minidom memory leak

Victor Muslin victor at prodigy.net
Wed May 23 18:09:11 CEST 2001


Below is a short program that leaks memory. Any ideas how to plug the
leak? What am I doing wrong?

TIA

--------------------------------------------------------------------

import xml.dom.minidom

request = '''
    <request version="1.0" id="1">
	<application type="ADSERVER" instance="ADSERVER_1">
		<parameter>SOURCE</parameter>
		<parameter>IPC/%</parameter>
		<parameter>%</parameter>
	</application>
    </request>
    '''

def parse():
    global request
    dom = xml.dom.minidom.parseString(request)
    doc = dom.documentElement
    doc.unlink()
    dom.unlink()
    del(doc)
    del(dom)

for i in range(2000):
    parse()




More information about the Python-list mailing list