[Scummvm-cvs-logs] SF.net SVN: scummvm:[54225] scummvm/trunk/engines/hugo
tdhs at users.sourceforge.net
tdhs at users.sourceforge.net
Sat Nov 13 09:08:59 CET 2010
Revision: 54225
http://scummvm.svn.sourceforge.net/scummvm/?rev=54225&view=rev
Author: tdhs
Date: 2010-11-13 08:08:58 +0000 (Sat, 13 Nov 2010)
Log Message:
-----------
HUGO: Close two minor memory leaks.
Destructor added to SoundHandler and added delete for _intro in engine destructor.
Modified Paths:
--------------
scummvm/trunk/engines/hugo/hugo.cpp
scummvm/trunk/engines/hugo/sound.cpp
scummvm/trunk/engines/hugo/sound.h
Modified: scummvm/trunk/engines/hugo/hugo.cpp
===================================================================
--- scummvm/trunk/engines/hugo/hugo.cpp 2010-11-13 02:59:46 UTC (rev 54224)
+++ scummvm/trunk/engines/hugo/hugo.cpp 2010-11-13 08:08:58 UTC (rev 54225)
@@ -160,6 +160,7 @@
delete _inventory;
delete _mouse;
delete _screen;
+ delete _intro;
delete _scheduler;
delete _file;
Modified: scummvm/trunk/engines/hugo/sound.cpp
===================================================================
--- scummvm/trunk/engines/hugo/sound.cpp 2010-11-13 02:59:46 UTC (rev 54224)
+++ scummvm/trunk/engines/hugo/sound.cpp 2010-11-13 08:08:58 UTC (rev 54225)
@@ -246,6 +246,10 @@
_midiPlayer = new MidiPlayer(driver);
}
+SoundHandler::~SoundHandler() {
+ delete _midiPlayer;
+}
+
void SoundHandler::setMusicVolume() {
/* Set the FM music volume from config.mvolume (0..100%) */
Modified: scummvm/trunk/engines/hugo/sound.h
===================================================================
--- scummvm/trunk/engines/hugo/sound.h 2010-11-13 02:59:46 UTC (rev 54224)
+++ scummvm/trunk/engines/hugo/sound.h 2010-11-13 08:08:58 UTC (rev 54225)
@@ -42,6 +42,7 @@
class SoundHandler {
public:
SoundHandler(HugoEngine *vm);
+ ~SoundHandler();
void toggleMusic();
void toggleSound();
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