File tree Expand file tree Collapse file tree 1 file changed +2
-22
lines changed
graalpython/com.oracle.graal.python.cext/src Expand file tree Collapse file tree 1 file changed +2
-22
lines changed Original file line number Diff line number Diff line change @@ -633,29 +633,9 @@ is_referenced_from_managed(PyGC_Head *gc)
633
633
* a Java array that is then referenced from each wrapper of native objects in
634
634
* the reference cycle. Therefore, if a native object of the cycle is then again
635
635
* used in managed code, it will keep all objects of the cycle alive.
636
+ *
637
+ * see `GraalPyTruffleObject_ReplicateNativeReferences`
636
638
*/
637
- #if 0
638
- static void
639
- break_cycles_with_managed_objects (PyGC_Head * young )
640
- {
641
- // previous elem in the young list, used for restore gc_prev.
642
- PyGC_Head * gc = GC_NEXT (young );
643
-
644
- /* Invariant: all objects that are part of a reference cycle have either
645
- * 'gc_refs == 0' if it is a native object or 'gc_refs == MANAGED_REFCNT'
646
- * if it is managed object.
647
- */
648
- while (gc != young ) {
649
- PyObject * op = FROM_GC (gc );
650
- if (is_managed (op ) && gc_get_refs (gc ) == MANAGED_REFCNT
651
- && Py_REFCNT (op ) > MANAGED_REFCNT ) {
652
- traverseproc traverse = Py_TYPE (op )-> tp_traverse ;
653
- collect_cycle_objects (op );
654
- }
655
- gc = (PyGC_Head * )UNTAG (gc )-> _gc_next ;
656
- }
657
- }
658
- #endif
659
639
660
640
/* GraalPy change: additions end */
661
641
You can’t perform that action at this time.
0 commit comments