I have tried to use

bmap_purge(bmap_for_entity(box_entity, 0));

which restores the original bitmap of my entity, but after a couple of seconds it fills up the videomemory and the engine crashes with this error:

D3Derror:D3DERR_OUTOFVIDEOMEMORY

Please send me some code to solve this...
Thanks.