MPMA Framework 0.4
Classes | Namespaces | Enumerations
Memory.h File Reference

Handles memory management and tracking/debugging. More...

Go to the source code of this file.

Classes

class  MPMAMemoryManager
 The memory manager. This is a global singleton: mpmaMemoryManager. Do not instantiate this yourself. More...
class  MPMA::AutoDelete< T >
 Automatically free a single object when this loses scope. More...
class  MPMA::AutoDeleteArray< T >
 Automatically free an array of objects when this loses scope. More...

Namespaces

namespace  MPMA
 

The Base MPMA Framework.


Enumerations

enum  EMemAllocType

Detailed Description

Handles memory management and tracking/debugging.


Enumeration Type Documentation

new3(t) - allocates an object of type t new3_array(t,c) - allocates an array of t's, of length c. new3(t(param1,param2,etc)) - allocates a new t using specific constructor parameters

delete3(mem) - frees memory allocated by new3 delete3_array(mem) - frees an array allocated by new3_array

new, delete, malloc, and free must not be mixed with new3 and delete3. if you have a private destructor, you must declare your class as a friend to (global namespace) MPMAMemoryManager.

Leaks will be reported to MPMA's ErrorReport() object. Only memory allocated after init and before shutdown are used for leak tracking purposes, but you can use the memory functions at any time.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends