From 908caac52e8e62baa1ee54e4e650e1cd3ac37907 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 27 Jan 2008 23:34:59 +0000 Subject: Added clear cache methods to clear the internal type lookup cache for ref leak test runs. --- Python/pythonrun.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 4939f548908..f5465c5edee 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -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 -- cgit v1.2.3