MediaEntry e = head; MediaEntry prev = null; while (e != null)
synchronized (this)
  public void removeImage(Image image)  {    MediaEntry e = head;    MediaEntry prev = null;    while (e != null)      {        if (e.image == image)	  {	    if (prev == null)	      head = e.next;	    else	      prev.next = e.next;	  }	prev = e;	e = e.next;      }  }