skydoves/viewmodel-lifecycle

TODO: RxJava/RxKotlin supports

skydoves opened this issue · 0 comments

Overview

Automatically call dispose() of the CompositeDisposable depending on ViewModel's lifecycle.

class MyViewModel: ViewModel() {
  // This will be automatically disposed of when ViewModel will be cleared.
  prival val compositeDisposable = AutoDisposeCompositeDisposable()
}