[Scummvm-cvs-logs] SF.net SVN: scummvm: [32757] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sun Jun 22 16:46:08 CEST 2008
Revision: 32757
http://scummvm.svn.sourceforge.net/scummvm/?rev=32757&view=rev
Author: peres001
Date: 2008-06-22 07:46:08 -0700 (Sun, 22 Jun 2008)
Log Message:
-----------
Added constructor and destructor to Dialogue, thus fixing a long standing leak.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/objects.cpp
scummvm/trunk/engines/parallaction/objects.h
Modified: scummvm/trunk/engines/parallaction/objects.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/objects.cpp 2008-06-22 14:31:45 UTC (rev 32756)
+++ scummvm/trunk/engines/parallaction/objects.cpp 2008-06-22 14:46:08 UTC (rev 32757)
@@ -207,6 +207,16 @@
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;
Modified: scummvm/trunk/engines/parallaction/objects.h
===================================================================
--- scummvm/trunk/engines/parallaction/objects.h 2008-06-22 14:31:45 UTC (rev 32756)
+++ scummvm/trunk/engines/parallaction/objects.h 2008-06-22 14:46:08 UTC (rev 32757)
@@ -181,6 +181,9 @@
struct Dialogue {
Question *_questions[NUM_QUESTIONS];
+
+ Dialogue();
+ ~Dialogue();
};
struct GetData { // size = 24
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list