Hello,
if I wish to manage in a “clean” way without any memory leak,
Do I need to delete the roofitresult object after a fit ?
RooFitResult *roofitresult;
roofitresult=mypdf.fitTo(mydataset);
//I no more need roofitresult
As a fact, the allocation of roofitresult object has been made by “fitTo”
–>should I manage to delete roofitresult when I no more need it ?
it seems that all roofit programs that I saw from colleagues so far, forget to delete this object ? would that drive to a (small) memory leak ?
Thank you
jblomer
September 21, 2020, 6:49am
2
@StephanH Can you advise?
Hello @escalier ,
good point …
I had hoped that this would be clarified in the documentation, but indeed, it wasn’t mentioned:
root-project:master
← hageboeck:docsSep
opened 07:49AM - 21 Sep 20 UTC
In general, the user has to delete the fit result. Failing to do so, there will be a small memory leak. If one ran a fit many times in a loop, it might become noticeable.
Thank you for the explanations.
system
Closed
October 5, 2020, 8:41am
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.