|
cbase 1.46.11
C/C++ Static Template
|
A saved checkpoint into an arena, used for scoped temporary allocations. More...
#include <mem_arena.h>

Public Attributes | |
| Arena * | arena |
| usize | pos |
A saved checkpoint into an arena, used for scoped temporary allocations.
Call arena_temp_begin() to capture the current pos, do your allocations, then call arena_temp_end() to roll the arena back to that exact position. This is the preferred pattern for scratch/temporary work buffers.
Definition at line 105 of file mem_arena.h.
| Arena* ArenaTemp::arena |
The arena this checkpoint belongs to.
Definition at line 106 of file mem_arena.h.
| usize ArenaTemp::pos |
The saved pos value to restore on arena_temp_end().
Definition at line 107 of file mem_arena.h.