commit 7365b4886cca1c21d540d581f70b80ee9ef4fe92 parent 10bd3b2c8cb46ef9d740980323e69ad83a63fa7d Author: falkTX <falktx@gmail.com> Date: Tue, 13 Oct 2015 02:17:48 +0200 Fix some small leaks Diffstat:
M | dgl/src/Window.cpp | | | 6 | ++++++ |
M | distrho/src/DistrhoPluginJack.cpp | | | 13 | ++++++++++--- |
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp @@ -264,6 +264,12 @@ struct Window::PrivateData { fView = nullptr; } + if (fTitle != nullptr) + { + std::free(fTitle); + fTitle = nullptr; + } + #if defined(DISTRHO_OS_WINDOWS) hwnd = 0; #elif defined(DISTRHO_OS_MAC) diff --git a/distrho/src/DistrhoPluginJack.cpp b/distrho/src/DistrhoPluginJack.cpp @@ -184,13 +184,20 @@ public: ~PluginJack() { - if (fClient == nullptr) - return; + if (fClient != nullptr) + jack_deactivate(fClient); - jack_deactivate(fClient); + if (fLastOutputValues != nullptr) + { + delete[] fLastOutputValues; + fLastOutputValues = nullptr; + } fPlugin.deactivate(); + if (fClient == nullptr) + return; + #if DISTRHO_PLUGIN_IS_SYNTH jack_port_unregister(fClient, fPortMidiIn); fPortMidiIn = nullptr;