Replacing existing.potential memory leak

Every time I create a histogram, I get an error saying “potential memory leak”. Even if this error occurs, the graph can be created and the program can be executed without any problem. But as it says “memory leak”, is it really a memory lease? Will the main memory be overwhelmed if I continue as it is? Please tell me the measures.

This was answered several time on the forum. For instance here.

Search for “potential memory leak”

I found out that I would delete it, but what kind of command should I use?
At the end of macro h1-> Delete () ;
After adding something like that, the graph is no longer generated. I’m sorry for being ignorant.

the C++ delete:

delete h1;

it is complete! thank you very much!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.