Getting memory leak after trying to fit histogram data to poisson function
{
f=new TF1(“f”, “TMath::Poisson(x,[0])”, 0, 16);
h=new TH1D("h", "Histogram", 100, 0, 16);
h->Fill(2,3);
h->Fill(3, 13);
h->Fill(4, 22);
h->Fill(5, 26);
h->Fill(6, 31);
h->Fill(7, 45);
h->Fill(8, 46);
h->Fill(9, 42);
h->Fill(10, 26);
h->Fill(11, 18);
h->Fill(12, 14);
h->Fill(13, 8);
h->Fill(14, 5);
h->Fill(15, 2);
c= new TCanvas();
h->Draw("hist");
h->Fit("f", "R");
f->Draw("SAME");
}