File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 11//! Garbage Collection State and Algorithm
22//!
3- //! This module implements CPython-compatible generational garbage collection
4- //! for RustPython, using an intrusive doubly-linked list approach.
3+ //! Generational garbage collection using an intrusive doubly-linked list.
54
65use crate :: common:: linked_list:: LinkedList ;
76use crate :: common:: lock:: { PyMutex , PyRwLock } ;
@@ -648,9 +647,9 @@ impl GcState {
648647 } ;
649648
650649 // Promote survivors to next generation BEFORE tp_clear.
651- // This matches CPython's order ( move_legacy_finalizer_reachable → delete_garbage)
652- // and ensures survivor_refs are dropped before tp_clear, so reachable objects
653- // (e.g. LateFin) aren't kept alive beyond the deferred-drop phase.
650+ // move_legacy_finalizer_reachable → delete_garbage order ensures
651+ // survivor_refs are dropped before tp_clear, so reachable objects
652+ // aren't kept alive beyond the deferred-drop phase.
654653 self . promote_survivors ( generation, & survivor_refs) ;
655654 drop ( survivor_refs) ;
656655
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ mod gc {
8080 }
8181
8282 /// Return the current collection thresholds as a tuple.
83- /// The third value is always 0 (matching 3.13+) .
83+ /// The third value is always 0.
8484 #[ pyfunction]
8585 fn get_threshold ( vm : & VirtualMachine ) -> PyObjectRef {
8686 let ( t0, t1, _t2) = gc_state:: gc_state ( ) . get_threshold ( ) ;
You can’t perform that action at this time.
0 commit comments