From: skowron Date: Thu, 31 Oct 2002 13:44:09 +0000 (+0000) Subject: Memory leak corrected X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=e9b3bfa830f0fcc76c11961c35ac1ba71e14df7d;ds=sidebyside Memory leak corrected --- diff --git a/HBTAN/AliHBTParticleCut.cxx b/HBTAN/AliHBTParticleCut.cxx index db244e37c5f..40c2a9facc7 100644 --- a/HBTAN/AliHBTParticleCut.cxx +++ b/HBTAN/AliHBTParticleCut.cxx @@ -202,13 +202,15 @@ void AliHBTParticleCut::Streamer(TBuffer &b) UInt_t R__s, R__c; if (b.IsReading()) { - /* Version_t v = */ b.ReadVersion(&R__s, &R__c); + Int_t i; + for (i = 0;i> fPID; b >> fNCuts; - for (Int_t i = 0;i> fCuts[i]; + b >> fCuts[i]; } b.CheckByteCount(R__s, R__c,AliHBTParticleCut::IsA()); } diff --git a/HBTAN/AliHBTReaderInternal.cxx b/HBTAN/AliHBTReaderInternal.cxx index aad455e6a1b..6e59b4ace82 100644 --- a/HBTAN/AliHBTReaderInternal.cxx +++ b/HBTAN/AliHBTReaderInternal.cxx @@ -253,15 +253,19 @@ Int_t AliHBTReaderInternal::Read(AliHBTRun* particles, AliHBTRun *tracks) totalNevents++; } - /***************************/ - /***************************/ - /***************************/ - currentdir++; - aFile->Close(); - aFile = 0x0; + /***************************/ + /***************************/ + /***************************/ + currentdir++; + delete tree; + aFile->Close(); + delete aFile; + aFile = 0x0; }while(currentdir < Ndirs); + delete pbuffer; + delete tbuffer; fIsRead = kTRUE; return 0; }