Fixing memory leak
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 Aug 2007 14:08:40 +0000 (14:08 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 Aug 2007 14:08:40 +0000 (14:08 +0000)
ITS/AliITSDetTypeRec.cxx

index 1c16bab..9b8c4d4 100644 (file)
@@ -987,6 +987,11 @@ void AliITSDetTypeRec::DigitsToRecPoints(AliRawReader* rawReader){
     cTree->SetBranchAddress("ITSRecPoints",&array);
     cTree->Fill();
     nClusters+=array->GetEntriesFast();
+
+    if (array != emptyArray) {
+      array->Delete();
+      delete array;
+    }
   }
   delete emptyArray;