Should gc.get_referrers (obj) return an empty list for an object, but the object is still accessible via a weak link?
If so, how will I start trying to determine the reason for this object that is not going to garbage?
Edit: I'm not sure exactly how the sample code will help in this case - there obviously is a strong link there, but I'll be damned if I can find it. I got the impression that all strong object references would be identified by get_referrers ().
Edit: Allowed . I found a variable with a strong reference - it was inside the game event loop, but it was not a class variable, so get_referrers did not collect it.
source
share