TCanvas with same name

From: Philip Rodrigues <p.rodrigues1_at_physics.ox.ac.uk>
Date: Tue, 25 Nov 2008 11:55:00 +0000


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 - 12:55:03 CET

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