Fixing memory leaks.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Mar 2010 01:46:39 +0000 (01:46 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Mar 2010 01:46:39 +0000 (01:46 +0000)
HLT/BASE/AliHLTComponent.cxx
HLT/BASE/AliHLTSystem.cxx
HLT/trigger/AliHLTTriggerBarrelGeomMultiplicity.cxx

index 5e3eff7..396cb0d 100644 (file)
@@ -412,6 +412,7 @@ int AliHLTComponent::SetComponentDescription(const char* desc)
        HLTWarning("unknown component description %s", argument.Data());
       }
     }
+    delete pTokens;
   }
   
   return iResult;
index ef83cc7..5bc83b3 100644 (file)
@@ -138,6 +138,7 @@ AliHLTSystem::~AliHLTSystem()
     fpComponentHandler->Destroy();
   }
   fpComponentHandler=NULL;
+  delete fStopwatches;
 
   // note: fpHLTOUTTask and fpControlTask are deleted by
   // CleanTaskList
index 59d081f..a5b7d89 100644 (file)
@@ -58,9 +58,6 @@ AliHLTTriggerBarrelGeomMultiplicity::AliHLTTriggerBarrelGeomMultiplicity()
   // refer to README to build package
   // or
   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
-  fDetectorArray = new TObjArray(1);
-
-  fDetectorArray = new TObjArray(1);
 
   fDetectorArray = new TObjArray;
 
@@ -69,6 +66,8 @@ AliHLTTriggerBarrelGeomMultiplicity::AliHLTTriggerBarrelGeomMultiplicity()
 AliHLTTriggerBarrelGeomMultiplicity::~AliHLTTriggerBarrelGeomMultiplicity()
 {
   // see header file for class documentation
+
+  if (fDetectorArray != NULL) delete fDetectorArray;
 }
 
 const char* AliHLTTriggerBarrelGeomMultiplicity::GetTriggerName() const