SHERLOCK: Free memory leaks from unreleased sound resources
This commit is contained in:
parent
9da6a90713
commit
ec56344ed7
2 changed files with 2 additions and 0 deletions
|
@ -313,6 +313,7 @@ bool Music::playMusic(const Common::String &name) {
|
|||
assert(data);
|
||||
|
||||
stream->read(data, dataSize);
|
||||
delete stream;
|
||||
|
||||
// for dumping the music tracks
|
||||
#if 0
|
||||
|
|
|
@ -135,6 +135,7 @@ bool Sound::playSound(const Common::String &name, WaitType waitType, int priorit
|
|||
byte *data = (byte *)malloc(size);
|
||||
byte *ptr = data;
|
||||
stream->read(ptr, size);
|
||||
delete stream;
|
||||
|
||||
assert(size > 2);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue