diff options
author | Paul Gilbert | 2017-09-19 20:00:32 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-09-19 20:00:32 -0400 |
commit | 0a44b54ee27a93d6609070d9ae3fa68ff419da85 (patch) | |
tree | 425a1c0c07d603e78512c841ba62d329dbbeeab0 /engines/titanic/true_talk | |
parent | ba45fb2d60824a61e15830de1c37bca35411f786 (diff) | |
download | scummvm-rg350-0a44b54ee27a93d6609070d9ae3fa68ff419da85.tar.gz scummvm-rg350-0a44b54ee27a93d6609070d9ae3fa68ff419da85.tar.bz2 scummvm-rg350-0a44b54ee27a93d6609070d9ae3fa68ff419da85.zip |
TITANIC: Fix memory leaks on shutdown
Diffstat (limited to 'engines/titanic/true_talk')
-rw-r--r-- | engines/titanic/true_talk/doorbot_script.cpp | 5 | ||||
-rw-r--r-- | engines/titanic/true_talk/doorbot_script.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/engines/titanic/true_talk/doorbot_script.cpp b/engines/titanic/true_talk/doorbot_script.cpp index ab50eca0c6..ac0b1aff21 100644 --- a/engines/titanic/true_talk/doorbot_script.cpp +++ b/engines/titanic/true_talk/doorbot_script.cpp @@ -61,6 +61,11 @@ DoorbotScript::DoorbotScript(int val1, const char *charClass, int v2, _states.load("States/Doorbot"); } +DoorbotScript::~DoorbotScript() { + for (int idx = 0; idx < 11; ++idx) + _sentences[idx].clear(); +} + void DoorbotScript::setupSentences() { for (int idx = 35; idx < 40; ++idx) CTrueTalkManager::setFlags(idx, 0); diff --git a/engines/titanic/true_talk/doorbot_script.h b/engines/titanic/true_talk/doorbot_script.h index 78ebcbfd68..536e9d42ca 100644 --- a/engines/titanic/true_talk/doorbot_script.h +++ b/engines/titanic/true_talk/doorbot_script.h @@ -58,6 +58,7 @@ private: public: DoorbotScript(int val1, const char *charClass, int v2, const char *charName, int v3, int val2, int v4, int v5, int v6, int v7); + virtual ~DoorbotScript(); /** * Chooses and adds a conversation response based on a specified tag Id. |