Browse Source

Fix some small leaks

pull/6/head
falkTX 8 years ago
parent
commit
7365b4886c
2 changed files with 16 additions and 3 deletions
  1. +6
    -0
      dgl/src/Window.cpp
  2. +10
    -3
      distrho/src/DistrhoPluginJack.cpp

+ 6
- 0
dgl/src/Window.cpp View File

@@ -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)


+ 10
- 3
distrho/src/DistrhoPluginJack.cpp View File

@@ -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;


Loading…
Cancel
Save