gh-116935: Document that heap types need to support garbage collection (GH-118021)
(cherry picked from commit
5d544365742a117027747306e2d4473f3b73d921)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
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:**