summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-07-01 23:19:57 (GMT)
committerGitHub <noreply@github.com>2020-07-01 23:19:57 (GMT)
commit666ecfb0957a2fa0df5e2bd03804195de74bdfbf (patch)
tree7d848ed239aeeece4ac47aaec793d1368d531b78 /Python
parent90db4653ae37ef90754cfd2cd6ec6857b87a88e6 (diff)
downloadcpython-666ecfb0957a2fa0df5e2bd03804195de74bdfbf.zip
cpython-666ecfb0957a2fa0df5e2bd03804195de74bdfbf.tar.gz
cpython-666ecfb0957a2fa0df5e2bd03804195de74bdfbf.tar.bz2
bpo-1635741: Release Unicode interned strings at exit (GH-21269)
* PyUnicode_InternInPlace() now ensures that interned strings are ready. * Add _PyUnicode_ClearInterned(). * Py_Finalize() now releases Unicode interned strings: call _PyUnicode_ClearInterned().
Diffstat (limited to 'Python')
-rw-r--r--Python/pylifecycle.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index cfbaf21..3ce2c41 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1263,6 +1263,7 @@ finalize_interp_types(PyThreadState *tstate)
_PyFrame_Fini(tstate);
_PyAsyncGen_Fini(tstate);
_PyContext_Fini(tstate);
+ _PyUnicode_ClearInterned(tstate);
_PyDict_Fini(tstate);
_PyList_Fini(tstate);