mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #17937: Try harder to collect cyclic garbage at shutdown.
This commit is contained in:
parent
20c1cdd64a
commit
fef34e3186
4 changed files with 32 additions and 6 deletions
|
@ -444,6 +444,7 @@ PyImport_Cleanup(void)
|
|||
|
||||
/* Finally, clear and delete the modules directory */
|
||||
PyDict_Clear(modules);
|
||||
_PyGC_CollectNoFail();
|
||||
interp->modules = NULL;
|
||||
Py_DECREF(modules);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue