Fixing memory leak (Francesco, Massimo)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 May 2006 16:12:35 +0000 (16:12 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 May 2006 16:12:35 +0000 (16:12 +0000)
STEER/AliVertexerTracks.cxx

index 1d6272e..c3744ab 100644 (file)
@@ -140,7 +140,9 @@ AliVertex* AliVertexerTracks::VertexForSelectedTracks(TObjArray *trkArray) {
     trkTree->Fill();
   }
     
-  return VertexForSelectedTracks(trkTree);
+  AliVertex *vtx =  VertexForSelectedTracks(trkTree);
+  delete trkTree;
+  return vtx;
 }
 
 //---------------------------------------------------------------------------