From aa28b99e16589f98bb944dd95322cb6b00931b5d Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Thu, 20 Mar 2025 14:10:27 +0000 Subject: [PATCH] Don't call _Py_ForgetReference before _Py_Dealloc --- Include/internal/pycore_object.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h index 08cbfe46b0daff..30b88404bbe204 100644 --- a/Include/internal/pycore_object.h +++ b/Include/internal/pycore_object.h @@ -445,9 +445,6 @@ static inline void Py_DECREF_MORTAL(const char *filename, int lineno, PyObject * _Py_DECREF_DecRefTotal(); } if (--op->ob_refcnt == 0) { -#ifdef Py_TRACE_REFS - _Py_ForgetReference(op); -#endif _Py_Dealloc(op); } }