[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol
STINNER Victor
report at bugs.python.org
Thu May 27 09:56:19 EDT 2021
STINNER Victor <vstinner at python.org> added the comment:
So it seems like the weakref list (__weaklistoffset__) doesn't have to be handled by visit, clear or free functions, it only has to be deallocated with PyObject_ClearWeakRefs() in the dealloc function.
I noticed that when reviewing partial_clear(partialobject *pto) in PR 26363.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42972>
_______________________________________
More information about the Python-bugs-list
mailing list