aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-08-17 11:35:24 +0200
committerEugene Sandulenko2016-08-17 11:35:24 +0200
commit556a5d572e108fdfd518bf998223c6959278e363 (patch)
tree91fa541b14aee6a929c51ca1b7edb7c43a4eadcf /engines
parent78c50a0f8923b0078ba8640a5a29f2cee0b10b0b (diff)
downloadscummvm-rg350-556a5d572e108fdfd518bf998223c6959278e363.tar.gz
scummvm-rg350-556a5d572e108fdfd518bf998223c6959278e363.tar.bz2
scummvm-rg350-556a5d572e108fdfd518bf998223c6959278e363.zip
DIRECTOR: Plug memory leaks
Diffstat (limited to 'engines')
-rw-r--r--engines/director/sound.cpp6
-rw-r--r--engines/director/sound.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/engines/director/sound.cpp b/engines/director/sound.cpp
index 5f6d435392..d6c78a51ea 100644
--- a/engines/director/sound.cpp
+++ b/engines/director/sound.cpp
@@ -36,6 +36,12 @@ DirectorSound::DirectorSound() {
_mixer = g_system->getMixer();
}
+DirectorSound::~DirectorSound() {
+ delete _sound1;
+ delete _sound2;
+ delete _scriptSound;
+}
+
void DirectorSound::playWAV(Common::String filename, uint8 soundChannel) {
Common::File *file = new Common::File();
diff --git a/engines/director/sound.h b/engines/director/sound.h
index 87a989c596..4327b63310 100644
--- a/engines/director/sound.h
+++ b/engines/director/sound.h
@@ -39,6 +39,7 @@ private:
public:
DirectorSound();
+ ~DirectorSound();
void playWAV(Common::String filename, uint8 channelID);
void playAIFF(Common::String filename, uint8 channelID);