Home | History | Annotate | Download | only in Modules

Lines Matching defs:finalizers

532 /* Move the objects in unreachable with __del__ methods into `finalizers`.
533 * Objects moved into `finalizers` have gc_refs set to GC_REACHABLE; the
537 move_finalizers(PyGC_Head *unreachable, PyGC_Head *finalizers)
542 /* March over unreachable. Move objects with finalizers into
543 * `finalizers`.
552 gc_list_move(gc, finalizers);
572 /* Move objects that are reachable from finalizers, from the unreachable set
573 * into finalizers set.
576 move_finalizer_reachable(PyGC_Head *finalizers)
579 PyGC_Head *gc = finalizers->gc.gc_next;
580 for (; gc != finalizers; gc = gc->gc.gc_next) {
581 /* Note that the finalizers list may grow during this. */
585 (void *)finalizers);
768 /* Handle uncollectable garbage (cycles with finalizers, and stuff reachable
770 * If DEBUG_SAVEALL, all objects in finalizers are appended to the module
771 * garbage list (a Python list), else only the objects in finalizers with
772 * __del__ methods are appended to garbage. All objects in finalizers are
775 * The finalizers list is made empty on a successful return.
778 handle_finalizers(PyGC_Head *finalizers, PyGC_Head *old)
780 PyGC_Head *gc = finalizers->gc.gc_next;
787 for (; gc != finalizers; gc = gc->gc.gc_next) {
796 gc_list_merge(finalizers, old);
880 PyGC_Head finalizers; /* objects with, & reachable from, __del__ */
952 * finalizers can't safely be deleted. Python programmers should take
953 * care not to create such things. For Python, finalizers means
958 gc_list_init(&finalizers);
959 move_finalizers(&unreachable, &finalizers);
960 /* finalizers contains the unreachable objects with a finalizer;
962 * and we move those into the finalizers list too.
964 move_finalizer_reachable(&finalizers);
982 * in finalizers to be freed.
988 for (gc = finalizers.gc.gc_next;
989 gc != &finalizers;
1015 (void)handle_finalizers(&finalizers, old);