How to remove a function stored with a histogram?

Hi,
I store a histogram with its fitting function to a root file. When I try to get the histogram pointer in this file by the method FindObject(“HistoName”) , what I get is the histogram and its fitting function together. I am wondering how to remove the acsossiated function when I get the histogram pointer?

Cheers,
Zhiyi.

delete myhist.GetListOfFunctions()->FindObject("functionName");
Rene