summaryrefslogtreecommitdiff
path: root/muse2/muse/plugin.cpp
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2011-10-03 01:56:34 +0000
committerTim E. Real <termtech@rogers.com>2011-10-03 01:56:34 +0000
commitf3313cc78e637ec9bc11efce5eb943434da93416 (patch)
tree29ca2c60eb262e25831639d09c33b80ff0df511c /muse2/muse/plugin.cpp
parent9200bb81f55b0d33e0a61af0112f1ca294375554 (diff)
Fixed HUGE massive memory leaks in all things using CItemList,
and SndFile, dssi, fluidsynth and other huge leaks. Large song with several dssi, vst, fluidsynths leaked 100's of MB, now only ~2MB.
Diffstat (limited to 'muse2/muse/plugin.cpp')
-rw-r--r--muse2/muse/plugin.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/muse2/muse/plugin.cpp b/muse2/muse/plugin.cpp
index 53e3d471..7205f482 100644
--- a/muse2/muse/plugin.cpp
+++ b/muse2/muse/plugin.cpp
@@ -4,6 +4,7 @@
// $Id: plugin.cpp,v 1.21.2.23 2009/12/15 22:07:12 spamatica Exp $
//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+// (C) Copyright 2011 Tim E. Real (terminator356 on sourceforge)
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -770,6 +771,8 @@ Plugin::~Plugin()
{
//if(_portDescriptors)
// delete[] _portDescriptors;
+ if(plugin)
+ delete plugin;
}
//---------------------------------------------------------
@@ -851,6 +854,8 @@ int Plugin::incReferences(int val)
plugin = descr->LADSPA_Plugin;
break;
}
+ //else
+ // delete descr;
}
}
else
@@ -881,6 +886,8 @@ int Plugin::incReferences(int val)
break;
}
+ //else
+ // delete descr;
}
}
}
@@ -1106,8 +1113,10 @@ static void loadPluginLib(QFileInfo* fi)
{
// Make sure it doesn't already exist.
if(plugins.find(fi->completeBaseName(), QString(descr->LADSPA_Plugin->Label)) != 0)
+ {
+ //delete descr;
continue;
-
+ }
#ifdef PLUGIN_DEBUGIN
fprintf(stderr, "loadPluginLib: dssi effect name:%s inPlaceBroken:%d\n", descr->LADSPA_Plugin->Name, LADSPA_IS_INPLACE_BROKEN(descr->LADSPA_Plugin->Properties));
#endif
@@ -1120,6 +1129,8 @@ static void loadPluginLib(QFileInfo* fi)
plugins.add(fi, descr->LADSPA_Plugin, true);
}
+ //else
+ // delete descr;
}
}
else
@@ -1152,8 +1163,10 @@ static void loadPluginLib(QFileInfo* fi)
// Make sure it doesn't already exist.
if(plugins.find(fi->completeBaseName(), QString(descr->Label)) != 0)
+ {
+ //delete descr;
continue;
-
+ }
#ifdef PLUGIN_DEBUGIN
fprintf(stderr, "loadPluginLib: ladspa effect name:%s inPlaceBroken:%d\n", descr->Name, LADSPA_IS_INPLACE_BROKEN(descr->Properties));
#endif