Removing Initial C1 Canvas

Hi,

I am drawing a histogram on a canvas I created:
hTripletChargeWeighted->Fit(“SingleExpoPlusConstant”,"","",startFit,stopFit);
TCanvas * cTripletFit = new TCanvas(“Triplet Fit”,“Triplet Fit”);
cTripletFit->cd();
hTripletChargeWeighted->Draw();

It draws the histogram on the canvas just fine, but it first draws the same histogram on a canvas called “c1”. I guess this is the default canvas? My question is this: How do I get rid of this default canvas “c1” when I want to draw my histogram on my own custom canvas?

Replace the “Draw” line with the “Fit” line.

See also:
https://root-forum.cern.ch/t/tips-for-efficient-and-successful-posting/28292/2

Thank you for the advice, it seems to have worked.