Steve D'Aprano wrote:

> Is there a way to log when the garbage collector finds and collects a
> reference cycle?
> 
> I don't care about objects claimed by the reference counter, I only care
> about cycles.

I don't know, and I don't think so. Would a structure like

a --- b --- c
|     |     |
d --- e --- f

count as one, or two, or three cycles? If you have a clear answer to that 
you can save the collected objects in gc.garbage and count the cycles 
yourself.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to