mirror of https://github.com/python/cpython
gh-125703: Correctly honour tracemalloc hooks on specialized DECREF paths (#125704)
This commit is contained in:
parent
6d93690954
commit
f8ba9fb2ce
|
@ -208,6 +208,11 @@ _Py_DECREF_SPECIALIZED(PyObject *op, const destructor destruct)
|
|||
#ifdef Py_TRACE_REFS
|
||||
_Py_ForgetReference(op);
|
||||
#endif
|
||||
struct _reftracer_runtime_state *tracer = &_PyRuntime.ref_tracer;
|
||||
if (tracer->tracer_func != NULL) {
|
||||
void* data = tracer->tracer_data;
|
||||
tracer->tracer_func(op, PyRefTracer_DESTROY, data);
|
||||
}
|
||||
destruct(op);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Correctly honour :mod:`tracemalloc` hooks in specialized ``Py_DECREF``
|
||||
paths. Patch by Pablo Galindo
|
Loading…
Reference in New Issue