Added clear cache methods to clear the internal type lookup cache for ref leak test runs.
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 1da6967..72d1039 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -709,6 +709,9 @@
     sys.path_importer_cache.clear()
     sys.path_importer_cache.update(pic)
 
+    # clear type cache
+    sys._cleartypecache()
+
     # Clear ABC registries, restoring previously saved ABC registries.
     for abc in [getattr(_abcoll, a) for a in _abcoll.__all__]:
         if not issubclass(abc, _Abstract):