add aubio_cleanup to clean fftw cached memory
#include "aubio_priv.h"
#include "sample.h"
#include "mathutils.h"
+#include "config.h"
void aubio_window(smpl_t *w, uint_t size, aubio_window_type wintype) {
uint_t i;
}
}
+void aubio_cleanup(void)
+{
+#if FFTW3_SUPPORT
+ fftw_cleanup();
+#else
+#if FFTW3F_SUPPORT
+ fftwf_cleanup();
+#endif
+#endif
+}
* calculate normalised autocorrelation function
*/
void aubio_autocorr(fvec_t * input, fvec_t * output);
+/**
+ * clean up cached memory at the end of program
+ *
+ * use this function at the end of programs to purge all
+ * cached memory. so far this function is only used to clean
+ * fftw cache.
+ */
+void aubio_cleanup(void);
#ifdef __cplusplus
}