Mercurial > mm7
diff mm7_1.cpp @ 705:e39702f35283
memory allocation partly reworked
author | zipi |
---|---|
date | Mon, 18 Mar 2013 21:50:20 +0000 |
parents | efde64b3e147 |
children | d6236f6a9882 f39d5902c85a |
line wrap: on
line diff
--- a/mm7_1.cpp Tue Mar 19 01:36:47 2013 +0400 +++ b/mm7_1.cpp Mon Mar 18 21:50:20 2013 +0000 @@ -84,10 +84,14 @@ if ( dword_507CC0 ) { dword_507CC0 = 0; - for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext ) + for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = j ) { - if ( BYTE1(i->field_1C) & 0x80 ) + j=i->pNext; + if ( BYTE1(i->field_1C) & 0x80 ) + { i->Release(); + pAllocator->FreeChunk(i); + } } for ( j = pGUIWindow_CurrentMenu->pControlsHead; j; j = j->pNext ) {