We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
__del__
1 parent 22b0de2 commit 1c13b29Copy full SHA for 1c13b29
Doc/reference/datamodel.rst
@@ -1667,6 +1667,8 @@ Basic customization
1667
1668
It is not guaranteed that :meth:`__del__` methods are called for objects
1669
that still exist when the interpreter exits.
1670
+ :class:`weakref.finalize` provides a straightforward way to register
1671
+ a cleanup function to be called when an object is garbage collected.
1672
1673
.. note::
1674
0 commit comments