Fixed minor memory leak.
authorbthorsbr <brian.peter.thorsbro@cern.ch>
Wed, 13 Aug 2014 12:30:56 +0000 (14:30 +0200)
committerhristov <Peter.Hristov@cern.ch>
Wed, 20 Aug 2014 08:27:40 +0000 (10:27 +0200)
EVGEN/AliGenReaderHepMC.cxx

index f24a055..b983b43 100644 (file)
@@ -53,6 +53,8 @@ void AliGenReaderHepMC::Init()
 
 Int_t AliGenReaderHepMC::NextEvent()
 {
+   // Clean memory
+   if (fGenEvent) delete fGenEvent;
    // Read the next event
    if ((fGenEvent = fEventsHandle->read_next_event())) {
       THepMCParser::ParseGenEvent2TCloneArray(fGenEvent,fParticleArray,false);