I apologize if the following issue sounds trivial, I am an occasional root user. Yet, I didn’t find any solution among the previous posts/answers.
I am using a TGraph object, which I need to reinitialize inside a loop from another TGraph. When drawing the source TGraph before the loop, then I systematically get the following warning message:
Warning in TROOT::Append: Replacing existing TH1: Graph (Potential memory leak).
The warning message does not appear, when “Draw()” is not called. From the ouptut, I can hardly see where the leak happens. Anyway, this is also annoying since I keep my code’s outputs, which then get very heavy …
My code is not easy to copy-paste here, but I was able to reproduce this from a short template that I attach.
test_root_pb.cpp (1.6 KB)
Many thanks in advance for helping me solve that issue.
test_root_pb.cpp (1.59 KB)