title: RxJava: auto unsubscribe in Android MVP
body: <p>i use <code>RxJava</code>/<code>Retrofit</code> in Android App with MVP Pattern.</p>
  
  <p>now i want to clean the <code>xxxPresenter</code> when the <code>Activity/Fragment</code> destroy for prevent <code>oom</code>.</p>
  
  <p>the Presenter simple code:</p>
  
  <pre><code>public class LoginPresenter {
  
      private LoginView mLoginView;
      private LoginMode mLoginMode;
      private Subscriber mLoginSubscriber;
  
      public LoginPresenter(LoginView loginView) {
          this.mLoginView = loginView;
          mLoginMode = new LoginMode();
      }
  
      void login(String userName, String pwd) {
          mLoginSubscriber = new Subscriber() {
              @Override
              public void onCompleted() {
  
              }
  
              @Override
              public void onError(Throwable e) {
  
              }
  
              @Override
              public void onNext(Object o) {
                  if (mLoginView != null) {
                      mLoginView.onLoginSuccess();
                  }
              }
          };
          mLoginMode.login(userName, pwd, mLoginSubscriber);
      }
  
      void destory() {
          mLoginView = null;
          mLoginSubscriber.unsubscribe();
      }
  
  }
  </code></pre>
  
  <p>when the Activity/Fragment destory will call presenter's destory() method</p>
  
  <p>my problem is：</p>
  
  <p>if a presenter has more network request i will hold a lot of subscriber members, has any way to let the subscriber auto unsubscribe when <code>Activity/Fragment</code> destory?</p>