diff options
author | Eugene Sandulenko | 2017-03-10 09:19:00 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-03-10 09:19:00 +0100 |
commit | 0a59d0a1c233bfec944b1eae5e281392793f5059 (patch) | |
tree | f1a5e6c4009f7f64a63fbdc755571b02871b1745 | |
parent | 2506f61575a694c27b759e4dd9d1ea194a3a9d0e (diff) | |
download | scummvm-rg350-0a59d0a1c233bfec944b1eae5e281392793f5059.tar.gz scummvm-rg350-0a59d0a1c233bfec944b1eae5e281392793f5059.tar.bz2 scummvm-rg350-0a59d0a1c233bfec944b1eae5e281392793f5059.zip |
DIRECTOR: Lingo: Don't leak memory on restart
-rw-r--r-- | engines/director/lingo/lingo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index d7ba3dbbef..2a089ddcc5 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -319,6 +319,9 @@ void Lingo::restartLingo() { warning("STUB: restartLingo()"); for (int i = 0; i <= kMaxScriptType; i++) { + for (ScriptHash::iterator it = _scripts[i].begin(); it != _scripts[i].end(); ++it) + delete it->_value; + _scripts[i].clear(); } |