diff options
author | Nicola Mettifogo | 2008-06-22 14:46:08 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-06-22 14:46:08 +0000 |
commit | d2609258ccaf536cc4178d1e9c690ad472ae877c (patch) | |
tree | bee9830b68c704510680a4f08490e1600f674e65 /engines/parallaction | |
parent | 4e2e46f16cd6480edc3509edfe4b49bde0268756 (diff) | |
download | scummvm-rg350-d2609258ccaf536cc4178d1e9c690ad472ae877c.tar.gz scummvm-rg350-d2609258ccaf536cc4178d1e9c690ad472ae877c.tar.bz2 scummvm-rg350-d2609258ccaf536cc4178d1e9c690ad472ae877c.zip |
Added constructor and destructor to Dialogue, thus fixing a long standing leak.
svn-id: r32757
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/objects.cpp | 10 | ||||
-rw-r--r-- | engines/parallaction/objects.h | 3 |
2 files changed, 13 insertions, 0 deletions
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; diff --git a/engines/parallaction/objects.h b/engines/parallaction/objects.h index afa6cc5ed5..2bc9df0bbe 100644 --- a/engines/parallaction/objects.h +++ b/engines/parallaction/objects.h @@ -181,6 +181,9 @@ struct Question { struct Dialogue { Question *_questions[NUM_QUESTIONS]; + + Dialogue(); + ~Dialogue(); }; struct GetData { // size = 24 |