Skip to content

Commit b5eb234

Browse files
committed
Handle trace refs in specialized decref
1 parent 3a91ee9 commit b5eb234

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Include/refcount.h

+6
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,9 @@ static inline void _Py_DECREF_MORTAL_SPECIALIZED(const char *filename, int linen
420420
_Py_DECREF_DecRefTotal();
421421
}
422422
if (--op->ob_refcnt == 0) {
423+
#ifdef Py_TRACE_REFS
424+
_Py_ForgetReference(op);
425+
#endif
423426
destruct(op);
424427
}
425428
}
@@ -464,6 +467,9 @@ static inline void Py_DECREF_MORTAL_SPECIALIZED(PyObject *op, destructor destruc
464467
assert(!_Py_IsStaticImmortal(op));
465468
_Py_DECREF_STAT_INC();
466469
if (--op->ob_refcnt == 0) {
470+
#ifdef Py_TRACE_REFS
471+
_Py_ForgetReference(op);
472+
#endif
467473
destruct(op);
468474
}
469475
}

0 commit comments

Comments
 (0)