Memory leak

Patrick Blanchette pblanchette at pixelsystems.com
Wed Jan 3 08:56:39 EST 2001


I experienced a similar problem when I run script that use the win32 extension embeded in a server.  
When I call the Py_Finalize method, the memory is not free completely.  
I think the Patch #101713 talk about this problem.  It seems that python have problem 
handling multiple Py_Initialize and Py_Finalise when extension are used.

I hope this problem will be corrected soon.


On Tue, 02 Jan 2001 19:00:48 GMT, alex116321 at my-deja.com wrote:
> I am experiencing memory leakage when using Python and COM.
> Specifically, I am using the Micosoft XML Parser to load and traverse
> XML DOM stuctures.  Everytime I access an XML node, more memory is
> consumed.  After a while, this can eat away most of the system
> resources if the Python session is not terminated.  Here is a simple
> example (assume the interpreter is used as a server and does not exit):
> 
> ############################################
> #Note: using del doesn't seem to help
> ############################################
> import win32com.client
> 
> o = win32com.client.Dispatch("microsoft.xmldom")
> o.loadXML("<test/>")
> 
> for idx in range(50000):
> 	node = o.selectSingleNode("//test")
> 
> #############################################
> 
> Any suggestions would be appreciated.
> 
> 
> 
> Sent via Deja.com
> http://www.deja.com/






More information about the Python-list mailing list