Torque2D Reference
Classes | Public Types | Public Member Functions | List of all members
BatchAllocator< AllocatedType, objectPerAllocation > Class Template Reference

#include <json_batchallocator.h>

Public Types

typedef AllocatedType Type
 

Public Member Functions

 BatchAllocator (unsigned int objectsPerPage=255)
 
 ~BatchAllocator ()
 
AllocatedType * allocate ()
 
void release (AllocatedType *object)
 

Member Typedef Documentation

typedef AllocatedType Type

Constructor & Destructor Documentation

BatchAllocator ( unsigned int  objectsPerPage = 255)
inline
~BatchAllocator ( )
inline

Member Function Documentation

AllocatedType* allocate ( )
inline

allocate space for an array of objectPerAllocation object.

Warning
it is the responsability of the caller to call objects constructors.
void release ( AllocatedType *  object)
inline

Release the object.

Warning
it is the responsability of the caller to actually destruct the object.

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