diff Python/import.c @ 83835:5abe85aefe29

Issue #17937: Try harder to collect cyclic garbage at shutdown.
author Antoine Pitrou <solipsis@pitrou.net>
date Sun, 19 May 2013 01:11:58 +0200
parents 8a5bebea9fec
children 82db02a2e023
line wrap: on
line diff
--- a/Python/import.c	Sat May 18 15:47:58 2013 -0700
+++ b/Python/import.c	Sun May 19 01:11:58 2013 +0200
@@ -444,6 +444,7 @@
 
     /* Finally, clear and delete the modules directory */
     PyDict_Clear(modules);
+    _PyGC_CollectNoFail();
     interp->modules = NULL;
     Py_DECREF(modules);
 }