garbage collection and Tkinter

Neil Schemenauer nascheme at enme.ucalgary.ca
Thu Jun 1 15:30:24 EDT 2000


Brian E Gallew <geek+ at cmu.edu> wrote:
>... is there a relatively easy way to examine the garbage
>collector to see why it is or is not collecting things?

The standard reference counting that Python uses cannot detect
reference cycles.  You could compile a new interpreter with
Py_TRACE_REFS defined.  The interpreter can then show you which
objects are still alive when it is shutting down.  You could also
grab my garbage collection patch from:

    http://www.enme.ucalgary.ca/~nascheme/python/gc.html

It allows reference cycles to be debugged quite easily.

    Neil

-- 
145 = 1! + 4! + 5!



More information about the Python-list mailing list