From f3313cc78e637ec9bc11efce5eb943434da93416 Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Mon, 3 Oct 2011 01:56:34 +0000 Subject: 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. --- muse2/muse/app.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'muse2/muse/app.cpp') diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 9f858bc3..fd024d57 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -112,6 +112,7 @@ extern void initMidiSynth(); extern void exitJackAudio(); extern void exitDummyAudio(); extern void exitOSC(); +extern void exitMidiAlsa(); #ifdef HAVE_LASH #include @@ -1562,12 +1563,13 @@ void MusE::closeEvent(QCloseEvent* event) } #endif - // Changed by Tim. p3.3.14 - //SynthIList* sl = song->syntis(); - //for (iSynthI i = sl->begin(); i != sl->end(); ++i) - // delete *i; song->cleanupForQuit(); + // Give midi devices a chance to close first, above in cleanupForQuit. + if(MusEGlobal::debugMsg) + printf("Muse: Exiting ALSA midi\n"); + exitMidiAlsa(); + if(MusEGlobal::debugMsg) printf("Muse: Cleaning up temporary wavefiles + peakfiles\n"); // Cleanup temporary wavefiles + peakfiles used for undo -- cgit v1.2.3