Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f6df46

Browse files
committed
Strengthen the constraints on calling PyObject_GC_Fini().
1 parent 6870bba commit 8f6df46

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Doc/api/api.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5029,6 +5029,11 @@ \section{Supporting Cyclic Garbarge Collection
50295029
objects. The deallocator (\member{tp_dealloc} handler) should call
50305030
this for the object before any of the fields used by the
50315031
\member{tp_traverse} handler become invalid.
5032+
5033+
\strong{Note:} Any container which may be referenced from another
5034+
object reachable by the collector must itself be tracked by the
5035+
collector, so it is generally not safe to call this function
5036+
anywhere but in the object's deallocator.
50325037
\end{cfuncdesc}
50335038

50345039
The \member{tp_traverse} handler accepts a function parameter of this

0 commit comments

Comments
 (0)