Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
FrameAllocatorMarker Class Reference

`#include <frameAllocator.h>`

## Public Member Functions
| FrameAllocatorMarker ()
| ~FrameAllocatorMarker ()
void * | alloc (const U32 allocSize) const

## 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.

## Constructor & Destructor Documentation

FrameAllocatorMarker | ( |  | ) |
| inline

~FrameAllocatorMarker | ( |  | ) |
| inline

## Member Function Documentation

void* alloc | ( | const U32 | allocSize | ) | const
| inline

The documentation for this class was generated from the following file:

- memory/frameAllocator.h