Fixing memory leaks
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 12 Feb 2004 11:51:21 +0000 (11:51 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 12 Feb 2004 11:51:21 +0000 (11:51 +0000)
MUON/AliMUON.cxx
MUON/AliMUONChamber.cxx
MUON/AliMUONGeometryConstituent.cxx

index d4cd72c..bb9c90b 100644 (file)
@@ -198,7 +198,16 @@ AliMUON::~AliMUON()
   if (fGeometryBuilders){
     fGeometryBuilders->Delete();
     delete fGeometryBuilders;
-  } 
+  }
+  if (fChambers){
+    fChambers->Delete();
+    delete fChambers;
+  }
+  if (fTriggerCircuits){
+    fTriggerCircuits->Delete();
+    delete fTriggerCircuits;
+  }
+  delete fMUONData;
 }
 //_____________________________________________________________________________
 void AliMUON::AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder)
index 557f345..4aa09c2 100644 (file)
@@ -47,10 +47,10 @@ ClassImp(AliMUONChamber)
     fSegmentation->AddAt(0,0);
     fSegmentation->AddAt(0,1);
     fResponse=0;
-    fGeometry = new AliMUONChamberGeometry(fId);
     fnsec=1;
     fReconstruction=0;
     fId=id;
+    fGeometry = new AliMUONChamberGeometry(fId);
     // to avoid mistakes if ChargeCorrelInit is not called
     fCurrentCorrel =1;
 }
@@ -62,6 +62,7 @@ AliMUONChamber::~AliMUONChamber()
     fSegmentation->Delete();
     delete fSegmentation;
   }
+  delete fGeometry;
 }
 
 AliMUONChamber::AliMUONChamber(const AliMUONChamber& rChamber):TObject(rChamber)
index 9f96d32..b572224 100644 (file)
@@ -102,7 +102,7 @@ AliMUONGeometryConstituent::~AliMUONGeometryConstituent()
 {
 //
   delete fTransformation;
-  delete fParam;
+  delete [] fParam;
 }
 
 //______________________________________________________________________________