From d2609258ccaf536cc4178d1e9c690ad472ae877c Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 22 Jun 2008 14:46:08 +0000 Subject: Added constructor and destructor to Dialogue, thus fixing a long standing leak. svn-id: r32757 --- engines/parallaction/objects.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'engines/parallaction/objects.cpp') diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp index cac31911f4..5b5aa85584 100644 --- a/engines/parallaction/objects.cpp +++ b/engines/parallaction/objects.cpp @@ -207,6 +207,16 @@ uint16 Zone::height() const { return _bottom - _top; } +Dialogue::Dialogue() { + memset(_questions, 0, sizeof(_questions)); +} + +Dialogue::~Dialogue() { + for (int i = 0; i < NUM_QUESTIONS; i++) { + delete _questions[i]; + } +} + Answer::Answer() { _text = NULL; _mood = 0; -- cgit v1.2.3