]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Remove memory leak (A. Zinchenko)
authorcussonno <cussonno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Feb 2005 09:51:01 +0000 (09:51 +0000)
committercussonno <cussonno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Feb 2005 09:51:01 +0000 (09:51 +0000)
MUON/AliMUONEventReconstructor.cxx

index 64eb0afe5c2b9eeb9356a32fee84f9f7cb486904..9bcfafdf63fa2c601e5e90c9dc44e0206ee0cf0c 100644 (file)
@@ -1183,8 +1183,8 @@ Int_t AliMUONEventReconstructor::MakeTrackCandidatesWithTwoSegments(AliMUONSegme
       // increment number of track candidates with 2 segments
       nbCan2Seg++;
     }
+    delete extrapSegment; // should not delete HitForRec's it points to !!!!
   } // for (iEndSegment = 0;...
-  delete extrapSegment; // should not delete HitForRec's it points to !!!!
   return nbCan2Seg;
 }
 
@@ -1245,9 +1245,8 @@ Int_t AliMUONEventReconstructor::MakeTrackCandidatesWithOneSegmentAndOnePoint(Al
        // increment number of track candidates
        nbCan1Seg1Hit++;
       }
+      delete extrapHitForRec;
     } // for (iHit = iHitMin;...
-    delete extrapHitForRec;
-    extrapHitForRec = NULL;
   } // for (ch = ch2;...
   return nbCan1Seg1Hit;
 }