Hi,
First of thanks for the beautiful timestretch library! I've been using signalsmith-stretch with pffft and noticed a memory leak.
When Pow2FFT is destroyed it uses resize(0) to free up memory but it seems pffft (at least the pffft version I am using) always allocates memory even if size is 0:
https://github.com/marton78/pffft/blob/a4b03590cc2a4bea56f9721996e3057835799179/src/pffft_common.c#L10
I fixed this localy with
~Pow2RealFFT() {
if (hasSetup) pffft_destroy_setup(fftSetup);
if (work) pffft_aligned_free(work);
if (tmpAligned) pffft_aligned_free(tmpAligned);
}
I think other.fftSetup = nullptr;is missing from the move constructor as well
Hi,
First of thanks for the beautiful timestretch library! I've been using signalsmith-stretch with pffft and noticed a memory leak.
When Pow2FFT is destroyed it uses resize(0) to free up memory but it seems pffft (at least the pffft version I am using) always allocates memory even if size is 0:
https://github.com/marton78/pffft/blob/a4b03590cc2a4bea56f9721996e3057835799179/src/pffft_common.c#L10
I fixed this localy with
I think
other.fftSetup = nullptr;is missing from the move constructor as well