Continued reworking of the GlobalChi2Fitter internal memory architecture
This merge request continues my previous work on refactoring the internal memory model of the GlobalChi2Fitter
. Previously, there was rampant use of raw pointers (with an assumption of ownership), and the new
and delete
keywords. This merge request gets rid of virtually all of these cases, and almost all heal allocations in the fitter should now be covered by std::unique_ptr
. The goal here is to make the code easier to understand by making the ownership model more explicit, make the code easier to maintain, and improve memory safety. As an added benefit, it also reduces the code volume a little.
My apologies a priori for the rather dense merge request. I've intentionally divided it into relatively small commits for easier analysis and debugging.
I've tested this merge request and have not observed any differences in output quality or CPU performance.