memory leak fixed
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Sep 2011 11:26:43 +0000 (11:26 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Sep 2011 11:26:43 +0000 (11:26 +0000)
T0/AliT0Digitizer.cxx

index 41c9dd9..011f0e0 100644 (file)
@@ -102,9 +102,10 @@ AliT0Digitizer::AliT0Digitizer(AliRunDigitizer* manager)
        y1[ii]=y[np-ii-1]; 
        x1[ii]=x[np-ii-1];
       }
-    
-    TGraph *grInverse = new TGraph(np,y1,x1);
-    fAmpLED.AddAtAndExpand(grInverse,i);
+      TGraph *grInverse = new TGraph(np,y1,x1);
+      fAmpLED.AddAtAndExpand(grInverse,i);
+      if (x1) delete x1;
+      if (y1) delete y1;
     }
   }
   for (Int_t i=0; i<24; i++){
@@ -121,6 +122,9 @@ AliT0Digitizer::AliT0Digitizer(AliRunDigitizer* manager)
       }
       TGraph *grInverseQTC = new TGraph(npq,y1q,x1q);
       fAmpQTC.AddAtAndExpand(grInverseQTC,i);
+      if (x1q)  delete x1q;
+      if (y1q)  delete y1q;
+
     }
   }
 }