Where S0classes.root is a root file that contains many TH1 objects. The idea is that this root file has to be read for each event, choose a particular TH1 and extract some information. I think Im correctly deleting the histogram and the file, but I dont know why this function creates a memory leak.
Thanks for your help!
Im using Root v6-14-02, Pythia v8.235 and Ubuntu 18.04.3 LTS
Works OK, indicating that Tfile and the TH1 are being deleted correctly. Furthermore if I include, in the previous dummy function, the line
InputFile = TFile::Open(“S0classes.root”);
Then the memory consumption starts to increase, but I dont understand why. This line indicates that the root file is being opened and deleted for each event.
Regards,
Lizardo
PS. I dont know if it is related, but Im using this routine within a Pythia simulation.
Exactly the same happens in CRMC that reads a simulation output from a .hepmc file
Should I test this function in an only-Root code? If so, can you point me to a example (inside $ROOTSYS?) where I can do it?