Hi @etejedor,
Thanks for the suggestion!
I tried the second option and it did allow my program to end.
In the meantime, I’ve also found on another thread (Pyroot hangs on TFile.Close() method):
ROOT.gROOT.GetListOfFiles().Remove(rfile_0)
This also seems quite efficient at releasing the memory.
I am not sure I fully understand what the latter instruction does though…
Cheers,
Quentin