diff --git a/numerical_methods/fast_fourier_transform.cpp b/numerical_methods/fast_fourier_transform.cpp index a12d9b7b9..bbb571b41 100644 --- a/numerical_methods/fast_fourier_transform.cpp +++ b/numerical_methods/fast_fourier_transform.cpp @@ -61,8 +61,8 @@ std::complex* FastFourierTransform(std::complex*p,uint64_t n) y[i]=ye[i]+pow(om,i)*yo[i]; ///Updating the first n/2 elements y[i+n/2]=ye[i]-pow(om,i)*yo[i];///Updating the last n/2 elements } - delete ye; - delete yo; + delete[] ye; + delete[] yo; return y;///Returns the list } @@ -113,8 +113,8 @@ static void test() { o2++; } - delete o1; - delete o2; + delete[] o1; + delete[] o2; }