diff options
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 60adb54..b17efdb 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -483,8 +483,8 @@ void _PyRuntimeState_Fini(_PyRuntimeState *runtime) { #ifdef Py_REF_DEBUG - /* The reftotal is cleared by _Py_FinalizeRefTotal(). */ - assert(runtime->object_state.reftotal == 0); + /* The count is cleared by _Py_FinalizeRefTotal(). */ + assert(runtime->object_state.interpreter_leaks == 0); #endif if (gilstate_tss_initialized(runtime)) { @@ -904,6 +904,12 @@ PyInterpreterState_Delete(PyInterpreterState *interp) _PyEval_FiniState(&interp->ceval); +#ifdef Py_REF_DEBUG + // XXX This call should be done at the end of clear_interpreter(), + // but currently some objects get decref'ed after that. + _PyInterpreterState_FinalizeRefTotal(interp); +#endif + HEAD_LOCK(runtime); PyInterpreterState **p; for (p = &interpreters->head; ; p = &(*p)->next) { |