Your problem has to do with the scope.
If you create an object can1 in your logon file, then delete
this canvas, the object can1 is deleted from the ROOT tables.
Its destructor has been called. However, it is still know (its anme)
from CINT. Next time you will attempt to use the name can1
(for example in can1.Draw) you will get a crash. You should
proceed as follows (if you insist doing this way)
TCanvas *can1 = new TCanvas("can1") in your logon file
now you can delete the canvas by closing the canvas in the "File" menu
or by the instruction "delete can1". Then, you can:
TFile f("can1.root");
can1 = (TCanvas*)f.Get("can1");
can1->Draw();
Rene Brun