bpo-1635741: Fix reference cycle by calling explicit gc collection in main interpreter#21902
Conversation
|
Before this PR: After this PR: |
|
Merged since it seems to fix multiple issues: #21902 (comment) Does it fix your issue with encoding names and encodings._aliases? |
|
cc @ncoghlan @ericsnowcurrently: Python finalization is getting better ;-) Yet another GC collection at exit! |
Yes, this PR have fix my issue. there have no remaining encodings.aliases in refdumps. |
|
I'm not sure that the GC is still fully functionnal after PyInterpreterState is cleared, but at least, it seems like there were a bunch of reference cycles. cc @pablogsal |
…honGH-21902) Fix a reference cycle by triggering an explicit GC collection after calling PyInterpreterState_Clear().
|
Just curious, what are the three leaks. |
You found this detail. I checked that some |
…honGH-21902) Fix a reference cycle by triggering an explicit GC collection after calling PyInterpreterState_Clear().
Authored-by: Victor Stinner [email protected]
https://bugs.python.org/issue1635741