mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-102304: Move the Total Refcount to PyInterpreterState (gh-102545)
Moving it valuable with a per-interpreter GIL. However, it is also useful without one, since it allows us to identify refleaks within a single interpreter or where references are escaping an interpreter. This becomes more important as we move the obmalloc state to PyInterpreterState. https://github.com/python/cpython/issues/102304
This commit is contained in:
parent
4bb1dd3c5c
commit
743687434c
13 changed files with 117 additions and 40 deletions
|
@ -592,7 +592,7 @@ _PyStructSequence_FiniType(PyTypeObject *type)
|
|||
// Don't use Py_DECREF(): static type must not be deallocated
|
||||
Py_SET_REFCNT(type, 0);
|
||||
#ifdef Py_REF_DEBUG
|
||||
_Py_DecRefTotal();
|
||||
_Py_DecRefTotal(_PyInterpreterState_GET());
|
||||
#endif
|
||||
|
||||
// Make sure that _PyStructSequence_InitType() will initialize
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue