Пример #1
0
  /**
   * Gets rid of all the resources of the view. No other methods should be invoked on the view
   * afterwards.
   */
  @SuppressWarnings("unchecked")
  @Override
  public void dispose() {
    if (executor != null) {
      executor.shutdown();
      executor = null;
    }

    if (disposables != null) {
      for (Disposable d : (LinkedList<Disposable>) disposables.clone()) {
        d.dispose();
      }
      disposables = null;
    }

    removeAll();
  }
Пример #2
0
 public void dispose() {
   for (Disposable d : disp) d.dispose();
 }