]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.10] bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH...
authorSam Gross <colesbury@gmail.com>
Thu, 28 Oct 2021 19:22:57 +0000 (15:22 -0400)
committerGitHub <noreply@github.com>
Thu, 28 Oct 2021 19:22:57 +0000 (21:22 +0200)
commit9e0012116ac9e8d26bf19ef8741deeecf2b6f72b
tree95dc6fd9733e9fabaa60572d66f1bd9cae7ed181
parent54579087c69f95531cbe7a97401c67f104a3e52f
[3.10] bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246) (GH-29249)

Objects that support garbage collection ("container" objects) should
call PyObject_GC_UnTrack() from their destructors before clearing any
fields which may point to other "container" objects.
(cherry picked from commit 35e1ff38ee67ee543d9fcb268c3552c5397f9b3f)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Doc/c-api/gcsupport.rst
Doc/c-api/typeobj.rst
Doc/extending/newtypes.rst