First time using this forum! I’m having an issue, performing a simulation (creating random Double_t) and filling then into a TTree (with several Branches). However, I have to run the simulation many times to get some kind of statistics, and to do so I’m using a
for loop over the other
for loop of around 10^6 iterations.
Writing on a different file each repetition, memory usage keeps growing without stop, even when the simulation ends (I have to manually .q to free it), and I don’t know why. I tried some combinations of options, and none of them worked. I just need to write 2 TH2 and 1 TTree into the files; I have already linked them to the output file and
Close() and deleted it, as you can see in the attached macro. The answers from another topics seem to have no better outcome. Probably it’s an easy issue that I couldn’t have found looking at the code, but I’m just a beginner with ROOT!
Hope you can help me, and thanks in advance!
Main macro: it’s here, i hope you don’t have to run it: ROOT macro - Pastebin.com
ROOT Version: 6.22/06
Platform: Ubuntu 20.04
Compiler: Pre-built version from web