[Scummvm-cvs-logs] SF.net SVN: scummvm: [32357] scummvm/branches/gsoc2008-rtl/engines/lure
cpage88 at users.sourceforge.net
cpage88 at users.sourceforge.net
Thu May 29 01:28:11 CEST 2008
Revision: 32357
http://scummvm.svn.sourceforge.net/scummvm/?rev=32357&view=rev
Author: cpage88
Date: 2008-05-28 16:28:11 -0700 (Wed, 28 May 2008)
Log Message:
-----------
LURE: Fixed some memory leaks when returning to the launcher from the LURE engine
Modified Paths:
--------------
scummvm/branches/gsoc2008-rtl/engines/lure/lure.cpp
scummvm/branches/gsoc2008-rtl/engines/lure/lure.h
scummvm/branches/gsoc2008-rtl/engines/lure/menu.cpp
scummvm/branches/gsoc2008-rtl/engines/lure/menu.h
scummvm/branches/gsoc2008-rtl/engines/lure/palette.cpp
scummvm/branches/gsoc2008-rtl/engines/lure/palette.h
scummvm/branches/gsoc2008-rtl/engines/lure/res.cpp
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/lure.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/lure.cpp 2008-05-28 23:17:10 UTC (rev 32356)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/lure.cpp 2008-05-28 23:28:11 UTC (rev 32357)
@@ -164,10 +164,14 @@
}
}
+/* This is not being used
+
void LureEngine::quitGame() {
_system->quit();
}
+*/
+
const char *LureEngine::generateSaveName(int slotNumber) {
static char buffer[15];
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/lure.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/lure.h 2008-05-28 23:17:10 UTC (rev 32356)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/lure.h 2008-05-28 23:28:11 UTC (rev 32357)
@@ -70,7 +70,7 @@
virtual int init();
virtual int go();
virtual void pauseEngineIntern(bool pause);
- void quitGame();
+ //void quitGame(); This is not being used
Disk &disk() { return *_disk; }
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/menu.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/menu.cpp 2008-05-28 23:17:10 UTC (rev 32356)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/menu.cpp 2008-05-28 23:28:11 UTC (rev 32357)
@@ -57,6 +57,11 @@
_width = (bounds->contentsWidth + 3) << 3;
}
+MenuRecord::~MenuRecord() {
+ free(_entries);
+ _entries = NULL;
+}
+
const char *MenuRecord::getEntry(uint8 index) {
if (index >= _numEntries) error("Invalid menuitem index specified: %d", index);
return _entries[index];
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/menu.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/menu.h 2008-05-28 23:17:10 UTC (rev 32356)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/menu.h 2008-05-28 23:28:11 UTC (rev 32357)
@@ -56,6 +56,7 @@
uint8 _numEntries;
public:
MenuRecord(const MenuRecordBounds *bounds, int numParams, ...);
+ ~MenuRecord();
uint16 xstart() { return _xstart; }
uint16 width() { return _width; }
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/palette.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/palette.cpp 2008-05-28 23:17:10 UTC (rev 32356)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/palette.cpp 2008-05-28 23:28:11 UTC (rev 32357)
@@ -106,6 +106,12 @@
delete srcData;
}
+// Destructor
+
+Palette::~Palette() {
+ delete _palette;
+}
+
void Palette::convertRgb64Palette(const byte *srcPalette, uint16 srcNumEntries) {
byte *pDest = _palette->data();
const byte *pSrc = srcPalette;
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/palette.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/palette.h 2008-05-28 23:17:10 UTC (rev 32356)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/palette.h 2008-05-28 23:28:11 UTC (rev 32357)
@@ -46,6 +46,7 @@
Palette(uint16 srcNumEntries, const byte *srcData, PaletteSource paletteSource);
Palette(Palette &src);
Palette(uint16 resourceId, PaletteSource paletteSource = DEFAULT);
+ ~Palette();
uint8 *data() { return _palette->data(); }
MemoryBlock *palette() { return _palette; }
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/res.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/res.cpp 2008-05-28 23:17:10 UTC (rev 32356)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/res.cpp 2008-05-28 23:28:11 UTC (rev 32357)
@@ -349,6 +349,7 @@
_indexedRoomExitHospots.push_back(RoomExitIndexedHotspotList::value_type(new RoomExitIndexedHotspotData(indexedRec)));
indexedRec++;
}
+ delete mb;
// Initialise delay list
_delayList.clear(true);
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