|
LCFIVertex
0.7.2
|
Memory management. More...
#include <memorymanager.h>


Public Member Functions | |
| virtual | ~MemoryManager () |
| Destructor - will delete all held objects. | |
| void | registerObject (T *pointer) |
| Register an object for memory management. | |
| void | delAll () |
| Delete all objects held by this MemoryManager. | |
| virtual | ~MemoryManager () |
| Destructor - will delete all held objects. | |
| void | registerObject (T *pointer) |
| Register an object for memory management. | |
| void | delAll () |
| Delete all objects held by this MemoryManager. | |
Public Member Functions inherited from vertex_lcfi::MemoryManagerType | |
| virtual | ~MemoryManagerType () |
| Empty Destructor. | |
| virtual | ~MemoryManagerType () |
| Empty Destructor. | |
Static Public Member Functions | |
| static MemoryManager< T > * | Event () |
| Returns the Event duration singleton instance of the MemoryManager for type T. | |
| static MemoryManager< T > * | Run () |
| Returns the Run duration singleton instance of the MemoryManager for type T. | |
| static MemoryManager< T > * | Event () |
| Returns the Event duration singleton instance of the MemoryManager for type T. | |
| static MemoryManager< T > * | Run () |
| Returns the Run duration singleton instance of the MemoryManager for type T. | |
Protected Member Functions | |
| MemoryManager () | |
| Do not use. | |
| MemoryManager (const MemoryManager< T > &) | |
| Do not use. | |
| MemoryManager< T > & | operator= (const MemoryManager< T > &) |
| Do not use. | |
| MemoryManager () | |
| Do not use. | |
| MemoryManager (const MemoryManager< T > &) | |
| Do not use. | |
| MemoryManager< T > & | operator= (const MemoryManager< T > &) |
| Do not use. | |
Memory management.
Memory in the vertex package is handled on a run and event basis If you wish to have an object that lasts the length of the event then call:
myType* myObject = new myType(construction parameters);
MemoryManager<myType>::Event()->registerObject(myObject);
At the end of the event to free all objects of all types made using the above call:
MetaMemoryManager::Event()->delAllObjects();
Similarly for run lifetime objects, replacing Event with Run.
Definition at line 58 of file include/vertex_lcfi/util/inc/memorymanager.h.
1.8.6