Torque3D Documentation / _generateds / FrameAllocatorMarker

FrameAllocatorMarker

Engine/source/core/frameAllocator.h

Helper class to deal with FrameAllocator usage.

More...

Private Attributes

Public Functions

Detailed Description

Helper class to deal with FrameAllocator usage.

The purpose of this class is to make it simpler and more reliable to use the FrameAllocator. Simply use it like this:

FrameAllocatorMarker mem;

char *buff = (char*)mem.alloc(100);

When you leave the scope you defined the FrameAllocatorMarker in, it will automatically restore the watermark on the FrameAllocator. In situations with complex branches, this can be a significant headache remover, as you don't have to remember to reset the FrameAllocator on every posssible branch.

Private Attributes

U32 mMarker 

Public Functions

FrameAllocatorMarker()

~FrameAllocatorMarker()

alloc(const U32 allocSize)

alloc(const U32 numElements)