summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-05-18 23:11:58 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-05-18 23:11:58 (GMT)
commitfef34e318697e53ea1b39a5da02308acdc5367f4 (patch)
tree8e0f466a86d5670014d783f222d497ad1bb144bc /Python/import.c
parent20c1cdd64aba14cbe7a2484f4569f3e7e4e7132a (diff)
downloadcpython-fef34e318697e53ea1b39a5da02308acdc5367f4.zip
cpython-fef34e318697e53ea1b39a5da02308acdc5367f4.tar.gz
cpython-fef34e318697e53ea1b39a5da02308acdc5367f4.tar.bz2
Issue #17937: Try harder to collect cyclic garbage at shutdown.
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index 1fbafec..a42b0f8 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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);
}