What is CompositeDisposable in RxJava
Composite disposable makes disposing (think cancelling early) easier. Say you have an activity that has multiple api calls happening at once: var disposable = api.call1(arg1, arg2).subscribe(…) var disposable2 = api.call2(arg1).subscribe(…) var disposable3 = api.call3().subscribe() If you need to prematurely dispose (e.g. the user navigating away from the activity) then you’d need to do this: disposable.dispose() … Read more