|
jam 0.0.1
A compacting generational garbage collector for C++26
|
An external conditional weak-value handle; registration survives dropped handles.Keep this handle outside the managed heap. Copies share one registration. Finalization expires all copies before the callback runs; resurrection does not rearm it. More...
Public Member Functions | |
| bool | expired () const noexcept |
| Whether the registration has retired or its heap has been destroyed. | |
| root< V > | lock () const noexcept |
| Retain the current value, or return an empty root for a retired registration. Locking and using the returned root require the owning heap current. | |
| void | finalize () const noexcept |
| Retire the registration and run its callback now, at most once. Requires the owning heap current. Also drains finalizers scheduled by nested collection. | |
An external conditional weak-value handle; registration survives dropped handles.
Keep this handle outside the managed heap. Copies share one registration. Finalization expires all copies before the callback runs; resurrection does not rearm it.