Hi,
I suggest to read a few tutorials to see examples.
deleting the canvas should work. However, note that in general this does
not make sense. I assume that you want to continue to see your canvas
after the macro execution.
If you are still lost, please send a script as short as possible showing
the problem.
Rene Brun
On
Fri, 7 Nov 2003, Margar Simonyan wrote:
> Dear all
> I am new ROOT user and my question may seems very simple.I am writing
> un-named scripts and using new operator to allocate memory, for example
>
> TCanvas * canvas = new TCanvas("canvas", "ROOT macro", 10, 10,800, 800);
>
> but I don't know how to delete canvas in script to avoid memory leakage,
> because gROOT-Reset() will not free the memory.
> I tried something like this
>
> int anyint;
> cout<<"input any integer ";
> cin>>anyint;
> delete canvas;
>
> but it doesn't work.I can avoid new operator's usage, but in all examples
> it is used. Could you explain me what is wrong.
>
> Best regards
> Margar
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET