[Scummvm-cvs-logs] SF.net SVN: scummvm: [32566] scummvm/branches/gsoc2008-rtl/engines/touche

cpage88 at users.sourceforge.net cpage88 at users.sourceforge.net
Fri Jun 6 02:34:47 CEST 2008


Revision: 32566
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32566&view=rev
Author:   cpage88
Date:     2008-06-05 17:34:47 -0700 (Thu, 05 Jun 2008)

Log Message:
-----------
TOUCHE: Fixed a memory leak

Modified Paths:
--------------
    scummvm/branches/gsoc2008-rtl/engines/touche/midi.cpp
    scummvm/branches/gsoc2008-rtl/engines/touche/touche.cpp

Modified: scummvm/branches/gsoc2008-rtl/engines/touche/midi.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/touche/midi.cpp	2008-06-05 21:39:44 UTC (rev 32565)
+++ scummvm/branches/gsoc2008-rtl/engines/touche/midi.cpp	2008-06-06 00:34:47 UTC (rev 32566)
@@ -107,6 +107,7 @@
 	_mutex.lock();
 	_driver->setTimerCallback(NULL, NULL);
 	_driver->close();
+	delete _driver;
 	_driver = 0;
 	_parser->setMidiDriver(NULL);
 	delete _parser;

Modified: scummvm/branches/gsoc2008-rtl/engines/touche/touche.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/touche/touche.cpp	2008-06-05 21:39:44 UTC (rev 32565)
+++ scummvm/branches/gsoc2008-rtl/engines/touche/touche.cpp	2008-06-06 00:34:47 UTC (rev 32566)
@@ -79,6 +79,7 @@
 ToucheEngine::~ToucheEngine() {
 	Common::clearAllSpecialDebugLevels();
 	delete _midiPlayer;
+//	delete driver;
 }
 
 int ToucheEngine::init() {
@@ -96,6 +97,8 @@
 	MidiDriver *driver = MidiDriver::createMidi(midiDriver);
 	_midiPlayer = new MidiPlayer(driver, native_mt32);
 
+
+//	delete driver;
 	_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
 	_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
 	_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, Audio::Mixer::kMaxMixerVolume);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list