/** Deallocate this sprite and return it to the sprite engine */ public void deallocate() { if (!allocated) { assert false; return; } setStyle(null); allocated = false; engine.deallocate(this); owner = null; }