mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
Added clear cache methods to clear the internal type lookup cache for ref leak test runs.
This commit is contained in:
parent
3ea7b41b58
commit
908caac52e
8 changed files with 55 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue