[3.10] gh-92036: Fix gc_fini_untrack() (GH-92037) by miss-islington · Pull Request #92296 · python/cpython
Fix a crash in subinterpreters related to the garbage collector. When a subinterpreter is deleted, untrack all objects tracked by its GC. To prevent a crash in deallocator functions expecting objects to be tracked by the GC, leak a strong reference to these objects on purpose, so they are never deleted and their deallocator functions are not called. (cherry picked from commit 1424336) Co-authored-by: Victor Stinner <vstinner@python.org>