--- TFFTComplex.cxx.new 2014-10-20 13:52:52.181412962 +0200 +++ TFFTComplex.cxx 2014-10-20 13:48:57.496249230 +0200 @@ -140,6 +140,10 @@ fSign = sign; fFlags = flags; + if (fPlan) + fftw_destroy_plan((fftw_plan)fPlan); + fPlan = 0; + if (fOut) fPlan = (void*)fftw_plan_dft(fNdim, fN, (fftw_complex*)fIn, (fftw_complex*)fOut, sign,MapFlag(flags)); else --- TFFTComplexReal.cxx.new 2014-10-20 13:53:00.425453854 +0200 +++ TFFTComplexReal.cxx 2014-10-20 13:49:31.988420264 +0200 @@ -150,6 +150,10 @@ fFlags = flags; + if (fPlan) + fftw_destroy_plan((fftw_plan)fPlan); + fPlan = 0; + if (fOut) fPlan = (void*)fftw_plan_dft_c2r(fNdim, fN,(fftw_complex*)fIn,(Double_t*)fOut, MapFlag(flags)); else --- TFFTRealComplex.cxx.new 2014-10-20 13:53:07.349488185 +0200 +++ TFFTRealComplex.cxx 2014-10-20 13:46:07.251405021 +0200 @@ -153,6 +153,10 @@ fFlags = flags; + if (fPlan) + fftw_destroy_plan((fftw_plan)fPlan); + fPlan = 0; + if (fOut) fPlan = (void*)fftw_plan_dft_r2c(fNdim, fN, (Double_t*)fIn, (fftw_complex*)fOut,MapFlag(flags)); else --- TFFTReal.cxx.new 2014-10-20 13:53:17.441538234 +0200 +++ TFFTReal.cxx 2014-10-20 13:49:19.796359814 +0200 @@ -170,6 +170,10 @@ // DSTIII - kind=6 // DSTIV - kind=7 + if (fPlan) + fftw_destroy_plan((fftw_plan)fPlan); + fPlan = 0; + if (!fKind) fKind = (fftw_r2r_kind*)fftw_malloc(sizeof(fftw_r2r_kind)*fNdim);