After going through some discussions about when to dispose a CompositeDisposable
, I wonder why we can't just add a .dispose()
after .subscribe()
in code.
Observable.just(0)
.doOnNext{...}
.subscribe()
.dispose()
What is actually happen if the code is like this? Is it ok to write like this? (instead of .addTo(compositeDisposable)
)