Added constructor and destructor to Dialogue, thus fixing a long standing leak.
svn-id: r32757
This commit is contained in:
parent
4e2e46f16c
commit
d2609258cc
2 changed files with 13 additions and 0 deletions
|
@ -207,6 +207,16 @@ uint16 Zone::height() const {
|
||||||
return _bottom - _top;
|
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() {
|
Answer::Answer() {
|
||||||
_text = NULL;
|
_text = NULL;
|
||||||
_mood = 0;
|
_mood = 0;
|
||||||
|
|
|
@ -181,6 +181,9 @@ struct Question {
|
||||||
|
|
||||||
struct Dialogue {
|
struct Dialogue {
|
||||||
Question *_questions[NUM_QUESTIONS];
|
Question *_questions[NUM_QUESTIONS];
|
||||||
|
|
||||||
|
Dialogue();
|
||||||
|
~Dialogue();
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GetData { // size = 24
|
struct GetData { // size = 24
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue