that could lead to memory leaks imo. why dont't you just ptr_remove, and set to NULL before creating it again?


Code:
if (bmap_mirrortarget)
{
ptr_remove(bmap_mirrortarget);	
bmap_mirrortarget = NULL;
}
bmap_mirrortarget = bmap_createblack(256,256,888);


Last edited by sivan; 05/27/14 13:37.

Free world editor for 3D Gamestudio: MapBuilder Editor