[Scummvm-cvs-logs] SF.net SVN: scummvm:[55671] scummvm/trunk/engines/tinsel/coroutine.h
tdhs at users.sourceforge.net
tdhs at users.sourceforge.net
Mon Jan 31 00:21:40 CET 2011
Revision: 55671
http://scummvm.svn.sourceforge.net/scummvm/?rev=55671&view=rev
Author: tdhs
Date: 2011-01-30 23:21:40 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
TINSEL: Memory Leak Fix in Coroutines.
This fixes the leak from the COR0_BEGIN_CODE macro's CoroContextTag allocation.
Setting the _sleep value to negative values prevented the deallocation of these.
Have tested for obvious regressions, but a full DW/DW2 playtest should be done to confirm that this doesn't cause any issues.
Thanks to fingolfin for indicating this solution.
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/coroutine.h
Modified: scummvm/trunk/engines/tinsel/coroutine.h
===================================================================
--- scummvm/trunk/engines/tinsel/coroutine.h 2011-01-30 23:19:30 UTC (rev 55670)
+++ scummvm/trunk/engines/tinsel/coroutine.h 2011-01-30 23:21:40 UTC (rev 55671)
@@ -184,7 +184,7 @@
* Stop the currently running coroutine.
*/
#define CORO_KILL_SELF() \
- do { if (&coroParam != &nullContext) { coroParam->_sleep = -1; } return; } while (0)
+ do { if (&coroParam != &nullContext) { coroParam->_sleep = 0; } return; } while (0)
/**
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