Current Path : /proc/2508182/root/usr/src/Python-3.12.7/Lib/test/leakers/ |
Current File : //proc/2508182/root/usr/src/Python-3.12.7/Lib/test/leakers/test_ctypes.py |
# Taken from Lib/test/test_ctypes/test_keeprefs.py, PointerToStructure.test(). from ctypes import Structure, c_int, POINTER import gc def leak_inner(): class POINT(Structure): _fields_ = [("x", c_int)] class RECT(Structure): _fields_ = [("a", POINTER(POINT))] def leak(): leak_inner() gc.collect()