Fixes for memory leaks
authormaszyman <maszyman@cern.ch>
Fri, 12 Sep 2014 11:58:15 +0000 (13:58 +0200)
committermaszyman <maszyman@cern.ch>
Fri, 12 Sep 2014 11:58:15 +0000 (13:58 +0200)
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderAOD.cxx

index e836e61..5077b20 100644 (file)
@@ -832,6 +832,7 @@ AliFemtoEvent* AliFemtoEventReaderAOD::CopyAODtoFemtoEvent()
       count_pass++;
       trackCopyV0 = CopyAODtoFemtoV0(aodv0);
       tEvent->V0Collection()->push_back(trackCopyV0);
+      delete trackCopyV0;
       //cout<<"Pushback v0 to v0collection"<<endl;
     }
   }
@@ -1587,7 +1588,7 @@ bool AliFemtoEventReaderAOD::RejectEventCentFlat(float MagField, float CentPerce
                              {.828,.793,.776,.772,.775,.796,.788,.804,.839}};
   int weightBinCent = (int) CentPercent;
   if(fRandomNumber->Rndm() > kCentWeight[weightBinSign][weightBinCent]) RejectEvent = kTRUE;
-
+  delete fRandomNumber;
   return RejectEvent;
 }