title: Disposing of observables
body: <p>This question is related to Android and life-cycles.
  Previously, I would have a series of subjects and subscribe to them on creation.</p>
  
  <p>Upon destruction, I would mark all the subjects as complete, assuming that it disposes all subscribers.</p>
  
  <p>With Android Studio 3.1, I get warnings for any subscriber that "isn't used". The solution is to add them to a "completable disposable" that I then dispose upon destruction.</p>
  
  <p>Is "composite disposable" all I need to properly cancel requests upon destruction? Did my previous way of marking subjects as complete do anything and is it necessary in this case?</p>
  
  <p>As a code example:</p>
  
  <pre><code>val observable: PublishSubject&lt;Int&gt; = PublishSubject.create()
  val disposable = observable.subscribe { /* subscription */ }
  
  fun onDestroy() {
      observable.onComplete() // is this line necessary or helpful?
      disposable.dispose()
  }
  </code></pre>