src/ofxAubioPitch.cpp: implement destructor
authorPaul Brossier <piem@piem.org>
Sat, 24 Oct 2015 22:51:45 +0000 (00:51 +0200)
committerPaul Brossier <piem@piem.org>
Sat, 24 Oct 2015 22:51:45 +0000 (00:51 +0200)
src/ofxAubioPitch.cpp

index 1511456..456d7e1 100644 (file)
@@ -51,7 +51,10 @@ void ofxAubioPitch::setup(string method, int buf_s, int hop_s, int samplerate)
 
 ofxAubioPitch::~ofxAubioPitch()
 {
-    //if (pitch) del_aubio_pitch(Pitch);
+    ofLogNotice() << "deleted ofxAubioPitch";
+    if (pitch) del_aubio_pitch(pitch);
+    if (aubio_input) del_fvec(aubio_input);
+    if (aubio_output) del_fvec(aubio_output);
 }
 
 void ofxAubioPitch::audioIn(float * input, int bufferSize, int nChannels)