gc.DEBUG_LEAK and gc.garbage

Cesar cesarpolar at gmail.com
Tue Apr 19 13:28:36 EDT 2005


Hi,

I am new with python, and I am having a look to program that leaks.
The first thing I have to do is to determine if what leaks it is the
python code of my company.

I have set the DEBUG_LEAK flag with the GC and in the program cycle
printed the length of the garbage list. Is this enough to determine if
there is a leak in the python code? (the value rises). I am not
totally sure (see below).

I played with other flags as DEBUG_SAVEALL, but I think they are not
useful for what I want.

Finally, in this group I have seen a reference to an article in which
they had the look to gc.garbage after calling explicitally to
gc.collect(). is this necessary?

Thanks, Cesar



More information about the Python-list mailing list