Reference Counting — Python 3.14.7 documentation

docs.python.org

Tin mới

The Very High Level Layer

Exception Handling

Python Module Index

3.14.7 Documentation

Python/C API reference manual

free-threaded builds

On free-threaded builds of Python, returning 1 isn’t sufficient to determine if it’s safe to treat o as having no access by other threads. Use PyUnstable_Object_IsUniquelyReferenced() for that instead.

PyUnstable_Object_IsUniquelyReferenced()

On free-threaded builds of Python, returning 1 isn’t sufficient to determine if it’s safe to treat o as having no access by other threads. Use PyUnstable_Object_IsUniquelyReferenced() for that instead.

Python build with Free Threading

On Python build with Free Threading, if refcnt is larger than UINT32_MAX, the object is made immortal.