Issue #17937: Try harder to collect cyclic garbage at shutdown.

This commit is contained in:
Antoine Pitrou 2013-05-19 01:11:58 +02:00
parent 20c1cdd64a
commit fef34e3186
4 changed files with 32 additions and 6 deletions

View file

@ -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);
}