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().
This commit is contained in:
Victor Stinner 2020-07-02 01:19:57 +02:00 committed by GitHub
parent 90db4653ae
commit 666ecfb095
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 36 deletions

View file

@ -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);