mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Issue #13380: add an internal function for resetting the ctypes caches
This commit is contained in:
parent
a5d5bb997b
commit
0e30317891
4 changed files with 26 additions and 11 deletions
|
|
@ -1076,6 +1076,13 @@ def dash_R_cleanup(fs, ps, pic, zdc, abcs):
|
|||
filecmp._cache.clear()
|
||||
struct._clearcache()
|
||||
doctest.master = None
|
||||
try:
|
||||
import ctypes
|
||||
except ImportError:
|
||||
# Don't worry about resetting the cache if ctypes is not supported
|
||||
pass
|
||||
else:
|
||||
ctypes._reset_cache()
|
||||
|
||||
# Collect cyclic trash.
|
||||
gc.collect()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue