I’m trying to update my code to the latest Root version, with which comes the latest RooFit 2.95, but the attached code fails where it did not used to.
The problem comes from the lines
RooCustomizer* custNeg = new RooCustomizer(*this,“neg”) ;
Commenting out the to setOwning lines solves the problem.
Or maybe the delete custPos at the end of the plotAsymOn method is not correct…
bu.C (1.82 KB)
Thanks for reporting that. The updated code aimed to fix a memory leak, but it appears not to work correctly in all circumstances. I will investigate and fix this.
I’ve been out sick for a while, hence the lack of progress. I will look into this problem (and your other one) this week.
This bug is still present in Roofit 3.0.
Argh, that was supposed to be fixed…
I’ll look into it again.
It turns out I did commit an earlier fix, but had also changed the ownership strategy of RooCustomizer, which undid
the effect of the fix.
A new fix has gone into the dev/roostats branch that should solve
this problem properly. I have tested your example with valgrind
to make sure there are no residual issue.
This fix will also be propagated to the first upcoming ROOT release.