LCFIVertex  0.7.2
memorymanager.cpp
1 #include <util/inc/memorymanager.h>
2 
3 namespace vertex_lcfi
4 {
5 
7  {}
8 
10  {
11  static MetaMemoryManager eventInstance;
12  return &eventInstance;
13  }
14 
16  {
17  static MetaMemoryManager runInstance;
18  return &runInstance;
19  }
20 
22  {
23  for(std::vector<MemoryManagerType*>::iterator iMem = _Types.begin();iMem != _Types.end();++iMem)
24  (*iMem)->delAll();
25  }
26 
28  {
29  _Types.push_back(Type);
30  }
31 
32 }
33 
34 
static MetaMemoryManager * Event()
Returns the Event duration singleton instance of the controller.
void delAllObjects()
Delete all objects of all types held by this instance.
MemoryManager Controller - see MemoryManager.
static MetaMemoryManager * Run()
Returns the Run duration singleton instance of the controller.
void registerType(MemoryManagerType *Type)
Used by the MemoryManager of each type to alert the controller of its existance.