jam 0.0.1
A compacting generational garbage collector for C++26
Loading...
Searching...
No Matches
jam::heap::root_handle Class Reference
Word heap | module jam

A four-byte handle to a collector-updated external root slot.Copies share a registration; moves leave the source detached and null. Operations on registered handles require the owning heap current and a quiescent collector. The heap must outlive all its registered handles. More...

Inheritance diagram for jam::heap::root_handle:
[legend]

Public Member Functions

 root_handle () noexcept=default
 Construct a detached null handle.
 root_handle (root_handle const &other) noexcept
 Share a registration in the current heap.
 root_handle (root_handle &&other) noexcept
 Transfer a registration, leaving the source detached.
root_handle & operator= (root_handle const &other) noexcept
 Replace this handle with a shared registration in the same heap.
root_handle & operator= (root_handle &&other) noexcept
 Transfer a registration in the same heap.
 ~root_handle () noexcept
 Release this reference; the last release recycles the slot.
offset get () const noexcept
 Resolve the slot through the current heap; returned offsets expire on collection.
offset operator* () const noexcept
 Read the current target offset.
 operator bool () const noexcept
 Whether this handle currently names a record.

Detailed Description

A four-byte handle to a collector-updated external root slot.

Copies share a registration; moves leave the source detached and null. Operations on registered handles require the owning heap current and a quiescent collector. The heap must outlive all its registered handles.

Definition at line 905 of file heap.ccm.


The documentation for this class was generated from the following file: