Added clear cache methods to clear the internal type lookup cache for ref leak test runs.

This commit is contained in:
Christian Heimes 2008-01-27 23:34:59 +00:00
parent 3ea7b41b58
commit 908caac52e
8 changed files with 55 additions and 0 deletions

View file

@ -377,6 +377,9 @@ Py_Finalize(void)
Py_XDECREF(warnings_module);
warnings_module = NULL;
/* Clear type lookup cache */
PyType_ClearCache();
/* Collect garbage. This may call finalizers; it's nice to call these
* before all modules are destroyed.
* XXX If a __del__ or weakref callback is triggered here, and tries to