mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-95324: Emit a warning if an object doesn't call PyObject_GC_UnTrack during deallocation in debug mode (#95325)
This commit is contained in:
parent
2833f3798d
commit
f40bc7fa49
8 changed files with 18 additions and 2 deletions
|
|
@ -558,6 +558,7 @@ proxy_bool(PyWeakReference *proxy)
|
|||
static void
|
||||
proxy_dealloc(PyWeakReference *self)
|
||||
{
|
||||
PyObject_GC_UnTrack(self);
|
||||
if (self->wr_callback != NULL)
|
||||
PyObject_GC_UnTrack((PyObject *)self);
|
||||
clear_weakref(self);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue