The allocator of the per-frame arena: memory that lives until the next frame begins.
- ui: the UI whose frame arena to use.
ui := headless();
defer free_ui(*ui);
scratch := alloc(16,, frame_allocator(*ui)); // freed when the next frame begins
assert(scratch != null);frame_allocator :: (ui: *UI_State) -> Allocator
The allocator of the per-frame arena: memory that lives until the next frame begins.
Parameters
- ui: *UI_State
- the UI whose frame arena to use.
Returns
- Allocator
ui := headless();
defer free_ui(*ui);
scratch := alloc(16,, frame_allocator(*ui)); // freed when the next frame begins
assert(scratch != null);