Skip to content

Instantly share code, notes, and snippets.

@kishandonga
Created September 22, 2020 12:19
Show Gist options
  • Save kishandonga/201d3f8b2a871b213332ee21fbcbbe84 to your computer and use it in GitHub Desktop.
Save kishandonga/201d3f8b2a871b213332ee21fbcbbe84 to your computer and use it in GitHub Desktop.
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