These are chat archives for ReactiveX/RxJava

Mar 2018
Carlo Xavier Lopez S
Mar 26 2018 09:58
Hi! some peers in our repo started using CompositeDisposable being injected from dagger, as a shared instance
do you see some downside to this?
for example, one benefit is to be able to clear the disposables on the activity/fragment lifecycles
Justin Tuchek
Mar 26 2018 11:33
I've seen this before. You could maybe say that it increases testability because you can mock and validate that your subscriptions are cleared/disposed.
Think it's harder to reason about who's subscriptions/disposables are you clearing because you first need to see if the thing is a Singleton or not and then try to figure out who else may be using it so you don't clobber somebody else's stream unintentionally.
Carlo Xavier Lopez S
Mar 26 2018 15:15
good point thanks @jtuchek