how do I find memory leaks?

Greg Ewing greg.ewing at compaq.com
Thu Jul 22 17:03:34 EDT 1999


"Heather A. Drury" wrote:
> 
> I thought using python/vtk
> would take care of all this memory garbage for me

A reasonable expectation, but unfortunately Python
doesn't quite deliver. Garbage collection in Python
is by reference counting only, so if there are any
cycles in your garbage, it never goes away.

You have to design your program so that it either
doesn't create any cycles or ensures that they are
broken when the data is no longer needed.

There was a module called Cyclops announced here
by Tim Peters recently for finding cycles in data 
structures. Take a look back in dejanews.

Greg




More information about the Python-list mailing list