diff --git a/plugins/Cardinal/src/AudioToCVPitch.cpp b/plugins/Cardinal/src/AudioToCVPitch.cpp index 89d9e69..2c79720 100644 --- a/plugins/Cardinal/src/AudioToCVPitch.cpp +++ b/plugins/Cardinal/src/AudioToCVPitch.cpp @@ -95,6 +95,14 @@ struct AudioToCVPitch : Module { configParam(PARAM_TOLERANCE, 0.f, 99.f, kDefaultTolerance, "Tolerance", " %"); } + ~AudioToCVPitch() override + { + if (pitchDetector != nullptr) + del_aubio_pitch(pitchDetector); + del_fvec(detectedPitch); + del_fvec(inputBuffer); + } + void process(const ProcessArgs& args) override { float cvPitch = lastUsedOutputPitch;