Understanding memory leak reports

Ross Ridge rridge at caffeine.csclub.uwaterloo.ca
Fri Dec 21 19:27:16 EST 2007


Giampaolo Rodola' <gnewsg at gmail.com> wrote:
>I'm in a big trouble since I don't know how to find some memory leaks
...
>The message printed on screen is the following:
>
>gc: collectable <function 00C70E70>
>gc: collectable <type 00B41018>
>gc: collectable <dict 00C6DE40>
>gc: collectable <tuple 00C09900>
>gc: collectable <tuple 00BCD510>
>gc: collectable <function 00C70EB0>
>gc: collectable <function 00C70E30>
>
>Since the main module is very big (more than 2800 lines of code) I do
>not understand which objects are not garbage collected.

They are being garbage collected.  That's what the "collectable" part
of the message means.  It's just a warning that those objects needed
to be garbage collected because they were refering to each other in
some sort of cycle.  While the memory used was being wasted before the
garbage collector ran, it probably doesn't have any negative effect on
your program.

						Ross Ridge

-- 
 l/  //	  Ross Ridge -- The Great HTMU
[oo][oo]  rridge at csclub.uwaterloo.ca
-()-/()/  http://www.csclub.uwaterloo.ca/~rridge/ 
 db  //	  



More information about the Python-list mailing list