Re: [ROOT] CINT bug ?

From: Jacek M. Holeczek (holeczek@us.edu.pl)
Date: Fri Mar 08 2002 - 12:36:58 MET


Hi,
> Suppose the following session:
>   TCanvas c1
>   h.Draw();
>   // now kill the canvas via the canvas file menu
In this case I could (maybe) agree that the "c1" object should be gone,
but a better idea would be to "mark" it somehow as "unusable" or
"zombie" without removing (it is a global variable, anyhow).
However, never if I define a pointer (or reference) :
	TCanvas *tmp;
	...
	 tmp = new TCanvas("c1","c1");
The "tmp" is a global variable. It may be used by many functions in a
mixed interpreted / compiled environment.
It is MY BUSINESS to be sure that it points to anything reasonable.
If I want, in any moment I can check :
	tmp = (TCanvas *)gROOT->GetListOfCanvases()->FindObject("c1");
But my scripts will fail if the "tmp" variable is mysteriously gone in the
meantime.
Now imagine that "tmp" is actually a compiled variable (ACLiC) ... used by
a couple of compiled routines ... and also by a couple of interpreted
routines ... (and interactively by the user)
Jacek.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:45 MET