Skip to main content

Module refcount

Module refcount 

Source
Expand description

Inline refcount operations for v2 heap objects.

These free functions operate on raw *const HeapHeader pointers, suitable for use from JIT-generated code and FFI. The caller is responsible for pointer validity.

Functions§

v2_get_refcount
Get the current reference count of a v2 heap object.
v2_release
Decrement the reference count of a v2 heap object. Returns true if the count reached zero (caller must deallocate).
v2_retain
Increment the reference count of a v2 heap object.