mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
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. svn-id: r55671
This commit is contained in:
parent
785f1776c4
commit
9573b1d2f5
@ -184,7 +184,7 @@ public:
|
||||
* 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)
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user