From b9384c52bb0dbd50cbfb78f9ce41e9fbe6e09c03 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sat, 22 Feb 2014 20:53:30 +0100 Subject: [PATCH] ZynAddSubFX: delete LocalZynAddSubFX instance in destructor This is a really embarrassing leak causing LMMS to never cleanup internal instances of ZynAddSubFX. Closes #357. --- plugins/zynaddsubfx/ZynAddSubFx.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/zynaddsubfx/ZynAddSubFx.cpp b/plugins/zynaddsubfx/ZynAddSubFx.cpp index 7078bc92f..2127c596e 100644 --- a/plugins/zynaddsubfx/ZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/ZynAddSubFx.cpp @@ -143,7 +143,10 @@ ZynAddSubFxInstrument::~ZynAddSubFxInstrument() engine::mixer()->removePlayHandles( instrumentTrack() ); m_pluginMutex.lock(); + delete m_plugin; delete m_remotePlugin; + m_plugin = NULL; + m_remotePlugin = NULL; m_pluginMutex.unlock(); }