mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #28649: Clear the typing module caches when search for reference leaks.
This commit is contained in:
parent
9b10756019
commit
28f42fd4f8
1 changed files with 8 additions and 0 deletions
|
@ -1526,6 +1526,14 @@ def dash_R_cleanup(fs, ps, pic, zdc, abcs):
|
|||
else:
|
||||
ctypes._reset_cache()
|
||||
|
||||
try:
|
||||
typing = sys.modules['typing']
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
for f in typing._cleanups:
|
||||
f()
|
||||
|
||||
# Collect cyclic trash and read memory statistics immediately after.
|
||||
func1 = sys.getallocatedblocks
|
||||
func2 = sys.gettotalrefcount
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue