bugs in `gc.get_referents()'
Martin von Loewis
loewis at informatik.hu-berlin.de
Mon Nov 26 18:28:23 CET 2001
Zooko <zooko at zooko.com> writes:
> But the remaining six entries are data structures from my code which
> do *not* refer to the object in question, and curiously those six
> data structures (or ones like them -- I'm not sure) are *always*
> returned from any call to gc.get_referents()!
Could you create a test case? I cannot reproduce such behaviour, and I
cannot see anything in the code of get_referrers that may cause such
That you are getting <TCPCommsHandler._readable_false() at
TCPCommsHandler.py:451> into this list indicates, to me, that there is
a bug in the C type of the tp_traverse function of that object
(this is not one of the Object types of core Python, is it?)
Each container is supposed to invoke the visitproc, and return its
return value if that is non-zero. Otherwise, it shall continue to
iterate over all objects, and return zero when done.
Could you provide a link to the source of the relevant tp_traverse
function for inspection?
More information about the Python-list