code: public ImageLayer setTile (Tile tile) {
      // avoid releasing and rereferencing the texture if the same tile is set
      if (this.tile != tile) {
        // reference the new texture before we release the old one; this avoids spurious freeing and
        // recreation when the old and new tile are derived from the same texture
        if (tile != null) tile.texture().reference();
        if (this.tile != null) this.tile.texture().release();
        this.tile = tile;
        checkOrigin();
      }
      return this;
    }
docs: Sets the texture rendered by this layer. One can supplied {@code null} to release and clear
  any texture currently being rendered and leave this layer in an uninitialized state. This
  isn't something one would normally do, but could be useful if one was free-listing image
  layers for some reason.