![]() |
XII Release 0.1.0
|
#include <FrameAllocator.h>
Static Public Member Functions | |
| static XII_ALWAYS_INLINE xiiAllocator * | GetCurrentAllocator () |
| static void | Swap () |
| static void | Reset () |
| Resets both buffers, typically called during shutdown. | |
Global frame allocator for temporary allocations that are reset each frame.
This is a convenience wrapper around xiiDoubleBufferedLinearAllocator that provides a global instance for frame-based allocations. Very efficient for temporary data that only needs to live for one frame (UI layouts, temporary strings, intermediate calculations, etc.).
Usage pattern:
Performance characteristics:
|
inlinestatic |
Returns the allocator for the current frame.
All allocations from this allocator will be automatically freed when the frame ends.
|
static |
Swaps the active buffer, should be called once per frame.
This makes the previous frame's allocations invalid and resets the allocator for new allocations.