memory leak?
Ryan
RMeek at pav.com
Mon Dec 30 10:57:45 EST 2002
I'm still looking through my program, and trying to identify leaks.
This code produces a quickly growing process. The memory is never
freed.
Am I doing something obviously wrong?
Thanks,
Ryan
import win32com.client
dom = win32com.client.Dispatch("Msxml2.DOMDocument.4.0")
dom.setProperty("SelectionLanguage", "XPath")
dom.loadXML("<event><id><eventtype>your-event</eventtype><eventtype>your-event</eventtype></id></event>")
nodes = dom.selectNodes("event/id/eventtype")
i = 0
while i < 100000:
text = nodes[0].Text
i += 1
RMeek at pav.com (Ryan) wrote in message news:<9755d828.0212180912.c4e2463 at posting.google.com>...
> Hello-
>
> I have a growing process size, that uses code like the code I've
> included below. Am I require to explicitly release memory here? I'm on
> Python 2.2.2, win32 build 148.
>
> Thanks in advance,
> Ryan
>
>
> import win32com.client
>
> dom = win32com.client.Dispatch("Msxml2.DOMDocument.4.0")
> dom.setProperty("SelectionLanguage", "XPath")
> dom.loadXML("<event><id><eventtype>your-event</eventtype><eventtype>your-event</eventtype></id></event>")
> nodes = dom.selectNodes("event/id/eventtype")
> i = 0
> while i < 20000:
> text = nodes[0].Text
> i += 1
More information about the Python-list
mailing list