[Scummvm-git-logs] scummvm master -> 0a44b54ee27a93d6609070d9ae3fa68ff419da85

dreammaster dreammaster at scummvm.org
Wed Sep 20 02:00:38 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0a44b54ee2 TITANIC: Fix memory leaks on shutdown


Commit: 0a44b54ee27a93d6609070d9ae3fa68ff419da85
    https://github.com/scummvm/scummvm/commit/0a44b54ee27a93d6609070d9ae3fa68ff419da85
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-09-19T20:00:32-04:00

Commit Message:
TITANIC: Fix memory leaks on shutdown

Changed paths:
    engines/titanic/main_game_window.cpp
    engines/titanic/true_talk/doorbot_script.cpp
    engines/titanic/true_talk/doorbot_script.h


diff --git a/engines/titanic/main_game_window.cpp b/engines/titanic/main_game_window.cpp
index d84ed85..f404487 100644
--- a/engines/titanic/main_game_window.cpp
+++ b/engines/titanic/main_game_window.cpp
@@ -50,6 +50,8 @@ CMainGameWindow::CMainGameWindow(TitanicEngine *vm): _vm(vm),
 
 CMainGameWindow::~CMainGameWindow() {
 	delete _project;
+	delete _gameView;
+	delete _gameManager;
 }
 
 void CMainGameWindow::applicationStarting() {
diff --git a/engines/titanic/true_talk/doorbot_script.cpp b/engines/titanic/true_talk/doorbot_script.cpp
index ab50eca..ac0b1af 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 78ebcbf..536e9d4 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.





More information about the Scummvm-git-logs mailing list