Lines Matching refs:tp_clear
12 runs tp_clear on all unreachable objects, if an unreachable object is
13 resurrected then tp_clear will eventually be called on it (or may already
15 historically common bug), tp_clear empties an instance's __dict__, and
16 "impossible" AttributeErrors result. At worst, tp_clear leaves behind an
44 will call before it's done --tp_clear()). It's not even necessarily that a
92 that have already suffered a tp_clear() call. There's no guarantee that an
93 object is in a sane state after tp_clear(). Bad things (including
128 defined-- or even predictable --order in which tp_clear() gets called on
148 So, to prevent any Python code from running while gc is invoking tp_clear()
158 tp_clear() on weakrefs with callbacks first. Instead the weakref module
160 tp_clear(): it removes the weakref from the weakly-referenced object's list
163 trigger, and (unlike weakref's tp_clear()) also prevents any callback
168 Then we can call tp_clear on all the cyclic objects and never trigger
217 vagaries of when tp_clear() happened to break enough cycles to trigger