The View mutation/lifetime contract. More...
Go to the source code of this file.
Classes | |
| class | pulp::view::DispatchLease |
| RAII gate held across any call into overridable View code. More... | |
Namespaces | |
| namespace | pulp |
| namespace | pulp::view |
| Hover-cursor tracking for platform window hosts. | |
The View mutation/lifetime contract.
A View invokes overridable code — on_attached(), on_detached(), on_frame_clock_changed(), focus/overlay hooks, bridge callbacks — and then keeps executing on this. Without a gate, such a hook can remove and destroy the very View whose member is running, so the member returns into freed memory.
The contract closing that hole has three parts:
The gate is owned by the tree root — one ownership authority per tree — and the retirement chain is intrusive, so retiring inside a noexcept walker allocates nothing.
See docs/reference/view-lifecycle.md for the full contract.