torque Torque Game Engine Documentation
TGE Version 1.5.2

FrameAllocatorMarker Class Reference

#include <frameAllocator.h>


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.


Public Member Functions

 FrameAllocatorMarker ()
 ~FrameAllocatorMarker ()
voidalloc (const U32 allocSize) const

Private Attributes

U32 mMarker


Constructor & Destructor Documentation

FrameAllocatorMarker::FrameAllocatorMarker (  )  [inline]

FrameAllocatorMarker::~FrameAllocatorMarker (  )  [inline]


Member Function Documentation

void* FrameAllocatorMarker::alloc ( const U32  allocSize  )  const [inline]


Field Documentation




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen