Lines Matching refs:trash
41 trash (CT) exists, then any call to any Python code whatsoever can end up
59 Clearing cyclic trash can call Python code. If there are weakrefs to
60 any of the cyclic trash, then those weakrefs can be used to resurrect
61 the objects. Therefore, *before* clearing cyclic trash, we need to
83 is that the weakly referenced object is unreachable trash at the time the
87 becomes part of a clump of cyclic trash. When enough cycles are broken by
102 Note that if it's possible for the callback to get at objects in the trash
104 trash cycles. Else the callback would have acted as an external root to
106 trash either.
111 More, if the callback itself is in cyclic trash, then the weakref to which
112 the callback is attached must also be trash, and for the same kind of
114 not have been cyclic trash.
117 weakly referenced object, all be in cyclic trash at the same time. This
121 modules had been torn down. That creates many trash cycles (esp. those
127 callbacks in cyclic trash. Since the weakrefs *are* trash, and there's no
129 cyclic trash, it's defensible to first clear weakrefs with callbacks. It's
146 latter weakrefs may or may not be part of cyclic trash.
149 on all the objects in cyclic trash,
174 (if any) *on* the callback objects that were also part of cyclic trash won't
175 get invoked, because we cleared all trash weakrefs with callbacks at the
176 start. Callbacks on the callback objects that were not part of cyclic trash
178 reachable from them was part of cyclic trash, so gc didn't do any damage to