|
jam 0.0.1
A compacting generational garbage collector for C++26
|
A copyable external root, updated during collection.Four-byte slot index; no heap or registration address is stored. The heap must outlive the root and be current for operations and destruction. More...
Public Member Functions | |
| root () noexcept=default | |
| Construct a detached null root. | |
| root (ptr< T > const &value) noexcept | |
| Register a pointer with the current heap. | |
|
template<class U> requires (!std::same_as<T, U>) && std::convertible_to<ptr<U>, ptr<T>> | |
| root (ptr< U > const &value) noexcept | |
| Register a derived pointer through its base allocation-tracing hook. | |
| ptr< T > | get () const noexcept |
| Obtain a pointer valid until the next collection. | |
| operator ptr< T > () const noexcept | |
| Copy the current pointer; this unrooted copy expires on collection. | |
| T * | operator-> () const noexcept |
| Borrow the target in its current heap scope. | |
| T & | operator* () const noexcept |
| Borrow the target in its current heap scope. | |
| operator bool () const noexcept | |
| Whether this root currently names a record. | |
A copyable external root, updated during collection.
Four-byte slot index; no heap or registration address is stored. The heap must outlive the root and be current for operations and destruction.