MRtrix3 / mrtrix3

MRtrix3 provides a set of tools to perform various advanced diffusion MRI analyses, including constrained spherical deconvolution (CSD), probabilistic tractography, track-density imaging, and apparent fibre density
http://www.mrtrix.org
Mozilla Public License 2.0
295 stars 182 forks source link

Fix memory leak in mrdegibbs #2761

Closed daljit46 closed 10 months ago

daljit46 commented 1 year ago

The FFT1D class in core/math/fft.h never called fftw_destroy_plan as documented here. This resulted in a memory leak. This fix calls this function in the destructor of this class, and it also additionally provides a copy assignment operator (to follow the rule of five I have deleted the move constructor and assignment operator).