Hey guys, quick question. Where should I dispose of a disposable observer if i am not using it in neither activity nor viewmodel/ fragment etc. Instead I am using it in my backend. There is no onclear, ondestroyed nor anything. I only have a
Copy code
val observer = object : DisposableObserver<DrillsType>() {
override fun onError(e: Throwable) {
Log.d("TAG", "error " + e.message)
}
override fun onNext(data: DrillsType) {
//onnext
}
override fun onComplete() {
Log.d("TAG", "COMPLETE")
}
}
remoteDataSource.loadDrillTypes().subscribeWith(observer)
}
It should be disposed when it's all finished. Can I dispose of it in the onComplete perhaps 😂?