diff options
author | Willem Jan Palenstijn | 2013-04-20 16:27:59 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-04-20 16:27:59 +0200 |
commit | 24b0b6aa43d1ef8e28064a69d9dde2389bec5c7d (patch) | |
tree | 5ada21771b9237bfd113f7b3534565354f750188 | |
parent | 9694cbbaafcd7d043edb5755df5cc5dda18a5d16 (diff) | |
download | scummvm-rg350-24b0b6aa43d1ef8e28064a69d9dde2389bec5c7d.tar.gz scummvm-rg350-24b0b6aa43d1ef8e28064a69d9dde2389bec5c7d.tar.bz2 scummvm-rg350-24b0b6aa43d1ef8e28064a69d9dde2389bec5c7d.zip |
SCI: Fix memory leak
-rw-r--r-- | engines/sci/resource_audio.cpp | 4 | ||||
-rw-r--r-- | engines/sci/resource_intern.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp index 684e1a1d0d..744f05f2b9 100644 --- a/engines/sci/resource_audio.cpp +++ b/engines/sci/resource_audio.cpp @@ -75,6 +75,10 @@ AudioVolumeResourceSource::AudioVolumeResourceSource(ResourceManager *resMan, co delete fileStream; } +AudioVolumeResourceSource::~AudioVolumeResourceSource() { + delete[] _audioCompressionOffsetMapping; +} + bool Resource::loadFromWaveFile(Common::SeekableReadStream *file) { data = new byte[size]; diff --git a/engines/sci/resource_intern.h b/engines/sci/resource_intern.h index e8e66503d8..c256c9d156 100644 --- a/engines/sci/resource_intern.h +++ b/engines/sci/resource_intern.h @@ -149,6 +149,8 @@ protected: public: AudioVolumeResourceSource(ResourceManager *resMan, const Common::String &name, ResourceSource *map, int volNum); + virtual ~AudioVolumeResourceSource(); + virtual void loadResource(ResourceManager *resMan, Resource *res); virtual uint32 getAudioCompressionType() const; |