Hi,
I have a line:
histos[0]= (TH1F*)gDirectory->Get(“name”)->Clone();
in a loop in my program, is it necessary to do a ‘delete’ for ‘histos[0]’ ? ‘histos[0]’ is global scopes.
I do delete in the following way at the beginning of each loop:
if(histos[0] != NULL)
{
histos[0]->Delete(); // “delete histos[0]” is better or the same?
histos[0] = NULL;
}
my program is compiled via ACLiC.
Thank you!