Lines Matching refs:finalizers
428 /* Move the objects in unreachable with tp_del slots into `finalizers`.
429 * Objects moved into `finalizers` have gc_refs set to GC_REACHABLE; the
433 move_legacy_finalizers(PyGC_Head *unreachable, PyGC_Head *finalizers)
438 /* March over unreachable. Move objects with finalizers into
439 * `finalizers`.
448 gc_list_move(gc, finalizers);
468 /* Move objects that are reachable from finalizers, from the unreachable set
469 * into finalizers set.
472 finalizers)
475 PyGC_Head *gc = finalizers->gc.gc_next;
476 for (; gc != finalizers; gc = gc->gc.gc_next) {
477 /* Note that the finalizers list may grow during this. */
481 (void *)finalizers);
647 * If DEBUG_SAVEALL, all objects in finalizers are appended to the module
648 * garbage list (a Python list), else only the objects in finalizers with
649 * __del__ methods are appended to garbage. All objects in finalizers are
653 handle_legacy_finalizers(PyGC_Head *finalizers, PyGC_Head *old)
655 PyGC_Head *gc = finalizers->gc.gc_next;
662 for (; gc != finalizers; gc = gc->gc.gc_next) {
671 gc_list_merge(finalizers, old);
674 /* Run first-time finalizers (if any) on all the objects in collectable.
806 PyGC_Head finalizers; /* objects with, & reachable from, __del__ */
880 * legacy finalizers (e.g. tp_del) can't safely be deleted.
882 gc_list_init(&finalizers);
883 move_legacy_finalizers(&unreachable, &finalizers);
884 /* finalizers contains the unreachable objects with a legacy finalizer;
886 * and we move those into the finalizers list too.
888 move_legacy_finalizer_reachable(&finalizers);
914 * in finalizers to be freed.
921 for (gc = finalizers.gc.gc_next;
922 gc != &finalizers;
945 handle_legacy_finalizers(&finalizers, old);