Lines Matching refs:gc
6 import gc
41 gc.garbage.clear()
42 gc.collect()
119 self.old_garbage = gc.garbage[:]
120 gc.garbage[:] = []
123 # None of the tests here should put anything in gc.garbage
125 self.assertEqual(gc.garbage, [])
128 gc.collect()
140 self.assertEqual(sorted(id(x) for x in gc.garbage), sorted(ids))
157 gc.collect()
161 gc.collect()
171 gc.collect()
176 gc.collect()
184 self.assertFalse(gc.is_tracked(s))
187 gc.collect()
190 gc.collect()
197 self.assertFalse(gc.is_tracked(s))
200 gc.collect()
204 gc.collect()
246 gc.collect()
250 gc.collect()
261 gc.collect()
269 gc.collect()
275 # Test the GC is able to deal with an object that kills its last
282 gc.collect()
286 gc.collect()
353 gc.collect()
357 gc.collect()
369 gc.collect()
375 gc.collect()
461 gc.garbage.clear()
462 gc.collect()
471 gc.collect()
476 gc.collect()
486 gc.collect()
493 gc.collect()
500 # Self-cycles with legacy finalizers end up in gc.garbage.
506 gc.collect()
513 gc.garbage[0].ref = None