Memory leak
alex116321 at my-deja.com
alex116321 at my-deja.com
Fri Jan 5 10:26:54 EST 2001
This is exactly what I am doing except I don't call Py_Finalize until
the program is terminated. Instead, I call the Python script over and
over again to perform a certain function. This seems to eat away at my
resources and over time, the program may crash.
Alex
In article <1103_978530180 at display_02>,
Patrick Blanchette <pblanchette at pixelsystems.com> wrote:
> 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/
>
>
Sent via Deja.com
http://www.deja.com/
More information about the Python-list
mailing list