Re: TCanvas with same name

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Tue, 25 Nov 2008 13:18:34 +0100


Philip,

a Warning is now printed (dev version) when creating a canvas with a name being the same as the one of an existing canvas.

Rene Brun

Philip Rodrigues wrote:
> Hi Roottalk,
>
> I've noticed a number of problems that occur when creating two
> TCanvases with the same name, ranging from crashing up to
> hard-to-track-down memory corruption. As an example, consider:
>
> TCanvas* c = new TCanvas("foo");
> TCanvas* c2 = new TCanvas("foo");
> delete c;
> c2->Draw();
>
> which crashes with development ROOT.
>
> So, could we have a warning printed when creating a canvas with the
> same name as an existing one (like the one printed for same-named
> histograms)?
>
> Thanks,
> Philip
>
Received on Tue Nov 25 2008 - 13:13:20 CET

This archive was generated by hypermail 2.2.0 : Tue Nov 25 2008 - 17:50:01 CET