[Scummvm-cvs-logs] SF.net SVN: scummvm:[47274] scummvm/trunk/engines/sci/sound
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Tue Jan 12 21:08:41 CET 2010
Revision: 47274
http://scummvm.svn.sourceforge.net/scummvm/?rev=47274&view=rev
Author: lordhoto
Date: 2010-01-12 20:08:17 +0000 (Tue, 12 Jan 2010)
Log Message:
-----------
Fix some memory leaks caused by never deleting the objects inside SoundCommandParser::_soundCommands.
Modified Paths:
--------------
scummvm/trunk/engines/sci/sound/soundcmd.cpp
scummvm/trunk/engines/sci/sound/soundcmd.h
Modified: scummvm/trunk/engines/sci/sound/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.cpp 2010-01-12 19:52:43 UTC (rev 47273)
+++ scummvm/trunk/engines/sci/sound/soundcmd.cpp 2010-01-12 20:08:17 UTC (rev 47274)
@@ -206,6 +206,9 @@
}
SoundCommandParser::~SoundCommandParser() {
+ for (SoundCommandContainer::iterator i = _soundCommands.begin(); i != _soundCommands.end(); ++i)
+ delete *i;
+
delete _music;
}
Modified: scummvm/trunk/engines/sci/sound/soundcmd.h
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.h 2010-01-12 19:52:43 UTC (rev 47273)
+++ scummvm/trunk/engines/sci/sound/soundcmd.h 2010-01-12 20:08:17 UTC (rev 47274)
@@ -77,7 +77,8 @@
#endif
private:
- Common::Array<MusicEntryCommand*> _soundCommands;
+ typedef Common::Array<MusicEntryCommand *> SoundCommandContainer;
+ SoundCommandContainer _soundCommands;
ResourceManager *_resMan;
SegManager *_segMan;
#ifdef USE_OLD_MUSIC_FUNCTIONS
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