![]() |
ezEngine Release 26.3
|
A double buffered linear allocator for temporary per-frame allocations. More...
#include <FrameAllocator.h>
Public Types | |
| using | LinearAllocatorType = ezLinearAllocator< ezAllocatorTrackingMode::Basics, OverwriteMemoryOnReset > |
Public Member Functions | |
| ezDoubleBufferedLinearAllocator (ezStringView sName, ezAllocator *pParent) | |
| EZ_ALWAYS_INLINE ezAllocator * | GetCurrentAllocator () const |
| void | Swap () |
| void | Reset () |
Static Public Attributes | |
| static constexpr bool | OverwriteMemoryOnReset = false |
A double buffered linear allocator for temporary per-frame allocations.
This allocator maintains two linear allocators and swaps between them each frame. One allocator is used for the current frame while the previous frame's allocator is reset. This pattern ensures that allocations from the previous frame remain valid until the next frame begins, which is useful for data that needs to persist across frame boundaries.