-1

Sorry i am still newbie in android development. I wanted to understand why we have to dispose thing from CompositeDisposable? and why we have to use CompositeDisposable?

Hao
  • 43
  • 8

1 Answers1

3

We have to dispose disposables from CompositeDisposable to stop the in progress requests when they are not required anymore. They should be cleared every time a user navigates to another activity from current activity or in cases in which the current activity is destroyed to cancel pending disposable requests and avoid memory leaks.

NIKHIL AGGARWAL
  • 448
  • 4
  • 9