[Scummvm-cvs-logs] SF.net SVN: scummvm:[44863] scummvm/trunk/engines/cruise
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sat Oct 10 07:08:56 CEST 2009
Revision: 44863
http://scummvm.svn.sourceforge.net/scummvm/?rev=44863&view=rev
Author: dreammaster
Date: 2009-10-10 05:08:56 +0000 (Sat, 10 Oct 2009)
Log Message:
-----------
Fixed memory leaks in savegame restoring
Modified Paths:
--------------
scummvm/trunk/engines/cruise/cruise_main.h
scummvm/trunk/engines/cruise/saveload.cpp
Modified: scummvm/trunk/engines/cruise/cruise_main.h
===================================================================
--- scummvm/trunk/engines/cruise/cruise_main.h 2009-10-10 04:47:18 UTC (rev 44862)
+++ scummvm/trunk/engines/cruise/cruise_main.h 2009-10-10 05:08:56 UTC (rev 44863)
@@ -114,6 +114,7 @@
int removeFinishedScripts(scriptInstanceStruct *ptrHandle);
void initBigVar3(void);
void resetActorPtr(actorStruct *ptr);
+void removeAllScripts(scriptInstanceStruct *ptrHandle);
void MemoryList();
void *MemoryAlloc(uint32 size, bool clearFlag, int32 lineNum, const char *fname);
Modified: scummvm/trunk/engines/cruise/saveload.cpp
===================================================================
--- scummvm/trunk/engines/cruise/saveload.cpp 2009-10-10 04:47:18 UTC (rev 44862)
+++ scummvm/trunk/engines/cruise/saveload.cpp 2009-10-10 05:08:56 UTC (rev 44863)
@@ -665,6 +665,7 @@
resetPreload();
freeCTP();
+ freeBackgroundIncrustList(&backgroundIncrustHead);
freezeCell(&cellHead, -1, -1, -1, -1, -1, 0);
// TODO: unfreeze anims
@@ -672,6 +673,8 @@
freeObjectList(&cellHead);
removeAnimation(&actorHead, -1, -1, -1);
+ removeAllScripts(&relHead);
+ removeAllScripts(&procHead);
changeScriptParamInList(-1, -1, &procHead, -1, 0);
removeFinishedScripts(&procHead);
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