Browse Source

Free CustomData memory on plugin destructor

tags/1.9.4
falkTX 11 years ago
parent
commit
9b1c5d635c
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      source/backend/plugin/CarlaPlugin.cpp

+ 16
- 0
source/backend/plugin/CarlaPlugin.cpp View File

@@ -115,6 +115,22 @@ CarlaPlugin::~CarlaPlugin()
delete[] kData->latencyBuffers;
}

for (auto it = kData->custom.begin(); it.valid(); it.next())
{
CustomData& cData(*it);

CARLA_ASSERT(cData.type != nullptr);
CARLA_ASSERT(cData.key != nullptr);
CARLA_ASSERT(cData.value != nullptr);

if (cData.type != nullptr)
delete[] cData.type;
if (cData.key != nullptr)
delete[] cData.key;
if (cData.value != nullptr)
delete[] cData.value;
}

kData->prog.clear();
kData->midiprog.clear();
kData->custom.clear();


Loading…
Cancel
Save