GetFunction() TF1 ownership

I’m sure this is covered somewhere, but I can’t find it.

I’m writing a C program (athena based) using root histograms. I use the code:

 ampHist->Fit("gaus","QL","",lowbound,highbound);
TF1 * fittedFunction = ampHist->GetFunction("gaus");

Should I delete fittedFunction after I’m done with it? Or does ampHist retain ownership?

Thanks

[/code][/quote]

The histogram retains ownership of the function when calling TH1::Fit.
When writing the histogram to a file, the list of associated functions is also written
and in a similar way when reading, such that when drawing the histogram from a file,
its associated function(s) are also drawn.

Rene