You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have adapted some of this code for my own project and one issue I ran in to was around use of CompositeDisposable.dispose() in FlowableUseCase for case where I need to update the subscription. In my case at least switching to clear resolved the issue. It looks like calling dispose has effect of not allowing subsequent use of disposables.
The text was updated successfully, but these errors were encountered:
" The reason for this is when you call dispose() that CompositeDisposable may as well no longer exist (as in, don’t add anything else to it because you’ll just be disappointed and frustrated when nothing works)."
Sorry for the late reply on this one! Yea dispose() means that you will no longer be able to add disposables to that composite disposable, clear() means you can - it just clears the disposables that are currently held within the instance.
The article has a nice idea but I would avoid having a Singleton to handle that, a lot of the responses there are thinking the same thing! You could have a disposable helper class which you could use to validate the composite disposable instance if you wanted to however :)
Have adapted some of this code for my own project and one issue I ran in to was around use of
CompositeDisposable.dispose()
inFlowableUseCase
for case where I need to update the subscription. In my case at least switching toclear
resolved the issue. It looks like callingdispose
has effect of not allowing subsequent use ofdisposables
.The text was updated successfully, but these errors were encountered: