I searched on TCanvas class but I couldnt find anything like this. I create a TCanvas on my code somewhere using:
TCanvas * whatever = new TCanvas(“bla”, “bla”)
Than on destructor I would do:
if (whatever) delete whatever;
But I noticed it was crashing because of that and I discovered that there is this Close member on TCanvas. So now I do:
if (whatever) {
whatever->Close();
delete whatever;
}
But if I close it with the mouse and quit the program it will crash also. I would like to know if there is something like isClosed() or anything that I can use to know if the canvas is opened and I need to close it.
Concerning your canvas deletion problem, could you post the shortest possible running script featuring this problem?
Concerning the axis with pi labelling, we will include this option in a coming release.
Meanwhile, you can proceed as shown in the script below.
So, if I take out the ->Close() it would do segmentation faul when I quit root without closing it myself, and if I put the Close and close it by myself it would do segmentation faul when I quit root. If there was a function like relCanvas->isClosed() I could avoid this problem, but maybe I am doing something wrong.