summaryrefslogtreecommitdiffstats
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2022-06-25 14:11:58 (GMT)
committerGitHub <noreply@github.com>2022-06-25 14:11:58 (GMT)
commit6b865349aae47b90f9ef0b98f3fe3720c2f05601 (patch)
tree9896212e12df59b30f9302fdeed61895f0600e3e /Python/pylifecycle.c
parent944c7d8a8561d4b637af5c128df1d8d7570ccb46 (diff)
downloadcpython-6b865349aae47b90f9ef0b98f3fe3720c2f05601.zip
cpython-6b865349aae47b90f9ef0b98f3fe3720c2f05601.tar.gz
cpython-6b865349aae47b90f9ef0b98f3fe3720c2f05601.tar.bz2
gh-94207: Fix struct module leak (GH-94239)
Make _struct.Struct a GC type This fixes a memory leak in the _struct module, where as soon as a Struct object is stored in the cache, there's a cycle from the _struct module to the cache to Struct objects to the Struct type back to the module. If _struct.Struct is not gc-tracked, that cycle is never collected. This PR makes _struct.Struct GC-tracked, and adds a regression test.
Diffstat (limited to 'Python/pylifecycle.c')
0 files changed, 0 insertions, 0 deletions