comparison Python/pythonrun.c @ 28651:7fda09f751ad legacy-trunk

- New C API PyGC_Collect(), same as calling gc.collect(). - Call this in Py_Finalize(). - Expand the Misc/NEWS text on PY_LONG_LONG.
author Guido van Rossum <guido@python.org>
date Thu, 17 Apr 2003 17:29:22 +0000
parents 04b172843292
children 56006d97bcef
comparison
equal deleted inserted replaced
28650:d8a8f744a3e5 28651:7fda09f751ad
253 253
254 /* drop module references we saved */ 254 /* drop module references we saved */
255 Py_XDECREF(PyModule_WarningsModule); 255 Py_XDECREF(PyModule_WarningsModule);
256 PyModule_WarningsModule = NULL; 256 PyModule_WarningsModule = NULL;
257 257
258 /* Collect garbage. This may call finalizers; it's nice to call these
259 before all modules are destroyed. */
260 PyGC_Collect();
261
258 /* Destroy all modules */ 262 /* Destroy all modules */
259 PyImport_Cleanup(); 263 PyImport_Cleanup();
264
265 /* Collect final garbage. This disposes of cycles created by
266 new-style class definitions, for example. */
267 PyGC_Collect();
260 268
261 /* Destroy the database used by _PyImport_{Fixup,Find}Extension */ 269 /* Destroy the database used by _PyImport_{Fixup,Find}Extension */
262 _PyImport_Fini(); 270 _PyImport_Fini();
263 271
264 /* Debugging stuff */ 272 /* Debugging stuff */