> Whenever the GC finds a cycle that is unreferenced but uncollectable,
> it stores those objects in the list gc.garbage.  At that point, if the
> user wishes to clean up those cycles, it is up to them to delve into
> gc.garbage, untangle the objects contained within, break the cycles,
> and remove them from the list so that they can be freed by the ref
> counter.

I wonder if it would be useful to provide a gc.garbagehook analogous
to sys.excepthook?
Users could assign a function of their choice to much the cyclic
garbage periodically.

Just a thought, flying out of my fingers before my brain could stop it...

Skip
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to