> gc.set_debug(gc.DEBUG_LEAK)
> print gc.garbage
> 
> --output:--
> []
> gc: uncollectable <Dog 0x56e10>
> gc: uncollectable <Cat 0x56e30>
> gc: uncollectable <dict 0x58270>
> gc: uncollectable <dict 0x43e40>

gc.garbage is filled only after these messages
are printed, not before. You need to add an explicit
call to gc.collect() if you want to see what
uncollectable garbage you have.

Regards,
Martin
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to