]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246)...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 28 Oct 2021 19:23:19 +0000 (12:23 -0700)
committerGitHub <noreply@github.com>
Thu, 28 Oct 2021 19:23:19 +0000 (21:23 +0200)
commit193504acf3bfb7cff1edf7f568c2405b857fa1f7
tree0b41ef542a8095bc4ce266fd55ee83f0db8c5d6e
parent8e5e74e3049875e9d834fe4408263676fe21e890
bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246) (GH-29248)

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