mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-111968: Refactor _PyXXX_Fini to integrate with _PyObject_ClearFreeLists (gh-114899)
This commit is contained in:
parent
564385612c
commit
d4d5bae147
20 changed files with 38 additions and 107 deletions
|
@ -1790,16 +1790,14 @@ finalize_interp_types(PyInterpreterState *interp)
|
|||
// a dict internally.
|
||||
_PyUnicode_ClearInterned(interp);
|
||||
|
||||
_PyDict_Fini(interp);
|
||||
_PyUnicode_Fini(interp);
|
||||
|
||||
#ifndef Py_GIL_DISABLED
|
||||
// With Py_GIL_DISABLED:
|
||||
// the freelists for the current thread state have already been cleared.
|
||||
_PyFreeListState *state = _PyFreeListState_GET();
|
||||
_PyTuple_Fini(state);
|
||||
_PyList_Fini(state);
|
||||
_PyFloat_Fini(state);
|
||||
_PySlice_Fini(state);
|
||||
_PyContext_Fini(state);
|
||||
_PyAsyncGen_Fini(state);
|
||||
_PyObject_ClearFreeLists(state, 1);
|
||||
#endif
|
||||
|
||||
#ifdef Py_DEBUG
|
||||
_PyStaticObjects_CheckRefcnt(interp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue