For releasing the mesh and textures call ent_purge, for removing the entity from the cache use the level_mark and level_free.