public void detachSprite(Sprite sprite){
  Collection<AttachedSprite> sprites=attachedSprites;
  if (sprites != null) {
    Iterator<AttachedSprite> it=sprites.iterator();
    while (it.hasNext()) {
      AttachedSprite as=it.next();
      if (as.sprite == sprite) {
        it.remove();
        break;
      }
    }
  }
}

public void detachSprite ( Sprite sprite ) { Collection < AttachedSprite > sprites = attachedSprites ; if ( sprites != null ) { Iterator < AttachedSprite > it = sprites . iterator ( ) ; while ( it . hasNext ( ) ) { AttachedSprite as = it . next ( ) ; if ( as . sprite == sprite ) { it . remove ( ) ; break ; } } } }
detach a sprite that has been previously attached to the view .
