mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-42745: finalize_interp_types() calls _PyType_Fini() (GH-23953)
Call _PyType_Fini() in subinterpreters. Fix reference leaks in subinterpreters.
This commit is contained in:
parent
3bcc4ead3f
commit
f4507231e3
3 changed files with 7 additions and 8 deletions
|
@ -1573,6 +1573,7 @@ finalize_interp_types(PyThreadState *tstate)
|
|||
_PyFrame_Fini(tstate);
|
||||
_PyAsyncGen_Fini(tstate);
|
||||
_PyContext_Fini(tstate);
|
||||
_PyType_Fini(tstate);
|
||||
// Call _PyUnicode_ClearInterned() before _PyDict_Fini() since it uses
|
||||
// a dict internally.
|
||||
_PyUnicode_ClearInterned(tstate);
|
||||
|
@ -1751,9 +1752,6 @@ Py_FinalizeEx(void)
|
|||
/* Destroy the database used by _PyImport_{Fixup,Find}Extension */
|
||||
_PyImport_Fini();
|
||||
|
||||
/* Cleanup typeobject.c's internal caches. */
|
||||
_PyType_Fini(tstate);
|
||||
|
||||
/* unload faulthandler module */
|
||||
_PyFaulthandler_Fini();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue