Garbage collection

Simon Pickles sipickles at
Tue Feb 19 09:38:30 CET 2008

Ken wrote:
> What is your __del__ method doing?
Actually, nothing but printing a message when the object is deleted, 
just morbid curiosity.

I've yet to see one of the destructor messages, tho....

>   from sys import getrefcount
>   print getrefcount(x)
Perfect, thanks


More information about the Python-list mailing list