diff options
-rw-r--r-- | engines/titanic/true_talk/tt_concept_node.h | 1 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_sentence.cpp | 5 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_sentence.h | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/engines/titanic/true_talk/tt_concept_node.h b/engines/titanic/true_talk/tt_concept_node.h index 9a1c3a9912..967625397a 100644 --- a/engines/titanic/true_talk/tt_concept_node.h +++ b/engines/titanic/true_talk/tt_concept_node.h @@ -43,6 +43,7 @@ public: public: TTconceptNode(); TTconceptNode(const TTconceptNode &src); + virtual ~TTconceptNode() {} /** * Delete any sibling chain attached to this node diff --git a/engines/titanic/true_talk/tt_sentence.cpp b/engines/titanic/true_talk/tt_sentence.cpp index b20f760f48..a1cf261bf2 100644 --- a/engines/titanic/true_talk/tt_sentence.cpp +++ b/engines/titanic/true_talk/tt_sentence.cpp @@ -27,6 +27,11 @@ namespace Titanic { +TTsentenceConcept::~TTsentenceConcept() { + for (int idx = 0; idx < 5; ++idx) + delete _concepts[idx]; +} + TTsentenceConcept *TTsentenceConcept::addSibling() { if (_nextP != nullptr) // This should never happen diff --git a/engines/titanic/true_talk/tt_sentence.h b/engines/titanic/true_talk/tt_sentence.h index cbaef26831..01a0346be8 100644 --- a/engines/titanic/true_talk/tt_sentence.h +++ b/engines/titanic/true_talk/tt_sentence.h @@ -39,6 +39,7 @@ class TTsentenceConcept : public TTconceptNode { public: TTsentenceConcept() : TTconceptNode() {} TTsentenceConcept(const TTsentenceConcept &src) : TTconceptNode(src) {} + virtual ~TTsentenceConcept(); /** * Adds a new sibling instance |