Re: [ROOT] Memory leak in TFile?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Apr 22 2002 - 08:54:18 MEST


Hi Iouri,

I cannot reproduce this problem.
Could you send me a real working example that I can use to
reproduce the problem ?
I cannot use your classes (some includes are missing)

Rene Brun

Chitov Iouri wrote:
> 
> Dear rooters,
> 
> In my program I create TFile from a set of raw binary data files.
> Repeating this procedure several times and comparing the
> gObjectTable->Print() outputs I see these results:
> 
> Differences in the table of objects:
> 31c31
> < TBasket                         2          2      112           224
> 224
> ---
> > TBasket                         3          3      112           336
> 336
> 77c77
> < TBuffer                         2          2       56           112
> 112
> ---
> > TBuffer                         3          3       56           168
> 168
> 
> Differences in the table of objects:
> 31c31
> < TBasket                         3          3      112           336
> 336
> ---
> > TBasket                         4          4      112           448
> 448
> 77c77
> < TBuffer                         3          3       56           168
> 168
> ---
> > TBuffer                         4          4       56           224
> 224
> 
> Ideas? It seems, like  whether I close TFile in the wrong way, or
> TFile desctructor forgot to clear something :).
> 
> Open TFile procedure:
> 
> fEvent = new TgvEvent();
> fRun = new TgvRun();
> fFile = new TFile(fn,"RECREATE");
> fTEvent = new TTree("ev","TGV Events");
> fTgvRun  = new TTree("rh","TGV Run Header");
> fTEvent->Branch("Event","TgvEvent",&fEvent,32000,99);
> fTgvRun->Branch("RunHeader","TgvRun",&fRun,1000,99);
> 
> Close procedure:
> 
> fFile->Write();
> delete fFile;
> fFile = 0;
> 
> And Event class files are in attachment.
> 
> Best wishes,
> Yuriy.
> 
>   --------------------------------------------------------------------------------
> 
>                     Name: TGVEvent.h
>    TGVEvent.h       Type: Plain Text (text/plain)
>                 Encoding: 7bit
> 
>                       Name: TGVEvent.cxx
>    TGVEvent.cxx       Type: Plain Text (text/plain)
>                   Encoding: 7bit



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:50 MET