]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
memory leak https://savannah.cern.ch/bugs/index.php?87435 finally fixed
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 21 Oct 2011 13:03:14 +0000 (13:03 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 21 Oct 2011 13:03:14 +0000 (13:03 +0000)
HLT/EMCAL/AliHLTEMCALAgent.cxx
HLT/EMCAL/AliHLTEMCALMapper.cxx

index 37f749666ae1f3bbbca19b5efa48eebcd0225706..729c535a3d4c6fe3cf893ac6e41a2f8b0b910288 100644 (file)
@@ -1,3 +1,4 @@
+// $Id$
 
 //**************************************************************************
 //* This file is property of and copyright by the ALICE HLT Project        * 
@@ -206,9 +207,11 @@ int AliHLTEMCALAgent::GetHandlerDescription(AliHLTComponentDataType dt,
                                             AliHLTOUTHandlerDesc& desc) const
 {
     // see header file for class documentation
-    
+
+    // FIXME: there is memory allocated in the mapper, this happens for every event
+    // and is time consuming, think about initializing the mappers only once, or make
+    // the mapper class more flexible to handle more than one specification
     AliHLTEMCALMapper mapper(spec);
-    mapper.InitDDLSpecificationMapping();
     
     // raw data blocks to be fed into offline reconstruction
     if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginEMCAL)) 
index 518652420e89f372d7d1dca1eb5ca8fd24e769f7..ac0a2850b158287f997c25fc45b237b713602ab8 100644 (file)
@@ -1,3 +1,5 @@
+// $Id$
+
 /**************************************************************************
  * This file is property of and copyright by the Experimental Nuclear     *
  * Physics Group, Dep. of Physics                                         *
@@ -125,6 +127,7 @@ AliHLTEMCALMapper::InitAltroMapping(const unsigned long specification )
 void 
 AliHLTEMCALMapper::InitDDLSpecificationMapping()
 {
+  if (fSpecificationMapPtr) delete [] fSpecificationMapPtr;
   fSpecificationMapPtr = new fDDLSpecificationMap[NMODULES*NRCUSPERMODULE];
   
   for(Int_t ddl = 0; ddl < NMODULES*NRCUSPERMODULE; ddl++)