mirror of
https://github.com/python/cpython.git
synced 2025-08-10 03:49:18 +00:00
[3.12] gh-116935: Document that heap types need to support garbage collection (GH-118021) (GH-118092)
gh-116935: Document that heap types need to support garbage collection (GH-118021)
(cherry picked from commit 5d54436574
)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
This commit is contained in:
parent
15be34ade8
commit
f278b8fefc
1 changed files with 2 additions and 1 deletions
|
@ -1052,7 +1052,8 @@ and :c:data:`PyType_Type` effectively act as defaults.)
|
|||
the type, and the type object is INCREF'ed when a new instance is created, and
|
||||
DECREF'ed when an instance is destroyed (this does not apply to instances of
|
||||
subtypes; only the type referenced by the instance's ob_type gets INCREF'ed or
|
||||
DECREF'ed).
|
||||
DECREF'ed). Heap types should also :ref:`support garbage collection <supporting-cycle-detection>`
|
||||
as they can form a reference cycle with their own module object.
|
||||
|
||||
**Inheritance:**
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue