diff options
author | Filippos Karapetis | 2009-04-11 14:44:03 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-04-11 14:44:03 +0000 |
commit | b3b862486927d6b5d7c1a9e5f78ed8d401a8dc2e (patch) | |
tree | 365462e5d6db7450d6d8340149b9154dbf8d4411 /engines/saga | |
parent | bb012ee082567990d883d0a387e83d7736b5cdba (diff) | |
download | scummvm-rg350-b3b862486927d6b5d7c1a9e5f78ed8d401a8dc2e.tar.gz scummvm-rg350-b3b862486927d6b5d7c1a9e5f78ed8d401a8dc2e.tar.bz2 scummvm-rg350-b3b862486927d6b5d7c1a9e5f78ed8d401a8dc2e.zip |
Plugged another memory leak introduced with rev #39934
svn-id: r39936
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/script.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp index 7a7e15c249..1cc85b05c2 100644 --- a/engines/saga/script.cpp +++ b/engines/saga/script.cpp @@ -220,7 +220,11 @@ Script::Script(SagaEngine *vm) : _vm(vm) { // Shut down script module gracefully; free all allocated module resources Script::~Script() { - + ScriptThreadList::iterator threadIterator = _threadList.begin(); + while (threadIterator != _threadList.end()) { + delete *threadIterator; + threadIterator = _threadList.erase(threadIterator); + } } // Script opcodes |