Created
September 22, 2020 12:19
-
-
Save kishandonga/201d3f8b2a871b213332ee21fbcbbe84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.reactivex.disposables.CompositeDisposable; | |
import io.reactivex.disposables.Disposable; | |
public class RxDisposable { | |
private static final RxDisposable RX_DISPOSABLE = new RxDisposable(); | |
private CompositeDisposable compositeDisposable = new CompositeDisposable(); | |
public static void addDisposable(Disposable disposable) { | |
RX_DISPOSABLE.compositeDisposable.add(disposable); | |
} | |
public static void clear() { | |
RX_DISPOSABLE.compositeDisposable.clear(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment