mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
Issue #13380: add an internal function for resetting the ctypes caches
This commit is contained in:
commit
4bc45b7a9f
4 changed files with 25 additions and 9 deletions
|
@ -1401,6 +1401,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