[ROOT] new user

From: Margar Simonyan (Margar.Simonyan@cern.ch)
Date: Fri Nov 07 2003 - 16:56:28 MET


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