Lines Matching refs:weakref
16 import weakref
57 self.wr = weakref.ref(C1055820(666), it_happened)
235 import weakref
256 # 5. Create a weakref to `func` now. If we had created
259 self[1].ref = weakref.ref(self[0])
683 WRs = [weakref.ref(c, callback) for c in Cs]
1063 # WZ is a weakref to Z with callback C
1078 # trash. Normally, handle_weakrefs() would find the weakref via Z and
1096 a.wz = weakref.ref(a.y.value, callback)
1106 # if called, it means there is a bug in the GC. The weakref should be
1308 c2wr = weakref.ref(c2) # no callback!
1315 c0wr = weakref.ref(c0, callback)
1322 # global weakref to c2 (c2wr), but that weakref has no callback.
1323 # There's also a global weakref to c0 (c0wr), and that does have a
1339 # that c2 has a callback-free weakref, and c1 doesn't even have a
1340 # weakref. Collecting generation 0 doesn't see c0 at all, and c0 is
1341 # the only object that has a weakref with a callback. gc clears c1
1367 # test_bug1055820c, but uses a __del__ method instead of a weakref
1384 c2wr = weakref.ref(c2) # no callback!
1391 # a global weakref to c2 (c2wr), but that weakref has no callback.
1407 # that c2 has a callback-free weakref, and c1 doesn't even have a
1408 # weakref. Collecting generation 0 doesn't see d0 at all. gc clears