mem leak fix
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 9 May 2011 07:54:35 +0000 (07:54 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 9 May 2011 07:54:35 +0000 (07:54 +0000)
PWG4/JetTasks/AliAnalyseLeadingTrackUE.cxx

index cdeb849..2985b3e 100644 (file)
@@ -194,7 +194,11 @@ TObjArray* AliAnalyseLeadingTrackUE::GetAcceptedParticles(TObject* obj, TObject*
     
     if (useEtaPtCuts)
       if (TMath::Abs(part->Eta()) > fTrackEtaCut || part->Pt() < fTrackPtMin)
+      {
+       if (hasOwnership)
+         delete part;
         continue;
+      }
     
     if (arrayMC) {
       Int_t label = part->GetLabel();