summaryrefslogtreecommitdiff
path: root/muse2/muse/dssihost.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/dssihost.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/dssihost.cpp')
-rw-r--r--muse2/muse/dssihost.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/muse2/muse/dssihost.cpp b/muse2/muse/dssihost.cpp
index 42653a91..ad4b2401 100644
--- a/muse2/muse/dssihost.cpp
+++ b/muse2/muse/dssihost.cpp
@@ -4,7 +4,7 @@
// $Id: dssihost.cpp,v 1.15.2.16 2009/12/15 03:39:58 terminator356 Exp $
//
// Copyright (C) 1999-2011 by Werner Schweer and others
-// (C) Copyright 2011 Tim E. Real (terminator356 on users dot sourceforge dot net)
+// (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
@@ -84,8 +84,6 @@ static void scanDSSILib(QFileInfo& fi) // ddskrjo removed const for argument
{
const DSSI_Descriptor* descr;
- // CRAPPY PLUGIN ALERT:
- // Out of many plugins, with several, Valgrind says something in here is allocated with new.
descr = dssi(i);
if (descr == 0)
break;
@@ -120,8 +118,10 @@ static void scanDSSILib(QFileInfo& fi) // ddskrjo removed const for argument
break;
}
if(is != synthis.end())
+ {
+ //delete descr;
continue;
-
+ }
DssiSynth* s = new DssiSynth(fi, descr);
if(MusEGlobal::debugMsg)
@@ -149,6 +149,9 @@ static void scanDSSILib(QFileInfo& fi) // ddskrjo removed const for argument
synthis.push_back(s);
}
+ //else
+ // delete descr;
+
}
}
dlclose(handle);
@@ -270,7 +273,8 @@ DssiSynth::DssiSynth(QFileInfo& fi, const DSSI_Descriptor* d) : // ddskrjo remov
DssiSynth::~DssiSynth()
{
-
+ if(dssi)
+ delete dssi;
}
//---------------------------------------------------------