mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-26 20:45:36 +08:00
use mg_slice_delete instead of free for CURSOR objects
This commit is contained in:
@@ -144,7 +144,7 @@ error:
|
|||||||
tempcsr = ((PG_RES)mgSharedRes)->sys_cursors[i];
|
tempcsr = ((PG_RES)mgSharedRes)->sys_cursors[i];
|
||||||
if (tempcsr) {
|
if (tempcsr) {
|
||||||
GAL_FreeCursorSurface (tempcsr->surface);
|
GAL_FreeCursorSurface (tempcsr->surface);
|
||||||
free (tempcsr);
|
mg_slice_delete (CURSOR, tempcsr);
|
||||||
((PG_RES)mgSharedRes)->sys_cursors[i] = NULL;
|
((PG_RES)mgSharedRes)->sys_cursors[i] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -203,7 +203,7 @@ static BOOL LoadCursorRes (void)
|
|||||||
temp += __mg_csrimgsize;
|
temp += __mg_csrimgsize;
|
||||||
free (tempcsr->AndBits);
|
free (tempcsr->AndBits);
|
||||||
free (tempcsr->XorBits);
|
free (tempcsr->XorBits);
|
||||||
free (tempcsr);
|
mg_slice_delete (CURSOR, tempcsr);
|
||||||
}
|
}
|
||||||
|
|
||||||
mgSizeRes += (sizeof (HCURSOR) + sizeof(CURSOR) + 2 * __mg_csrimgsize) * number;
|
mgSizeRes += (sizeof (HCURSOR) + sizeof(CURSOR) + 2 * __mg_csrimgsize) * number;
|
||||||
|
|||||||
Reference in New Issue
Block a user