architecture-components-samples icon indicating copy to clipboard operation
architecture-components-samples copied to clipboard

BasicRxJava example accumulates subscriptions until activity is destroyed?

Open gino-m opened this issue 6 years ago • 0 comments

Hi!

Do I understand correctly that the following snippet:

https://github.com/googlesamples/android-architecture-components/blob/f7562c627a1655041059266a1c5034424c64211b/BasicRxJavaSample/app/src/main/java/com/example/android/observability/ui/UserActivity.java#L93-L97

Will add a new subscription to mDisposable each time the button is clicked, and that these Disposable will not be cleaned up until the Activity is closed?

In our project we're currently doing a major cleanup to avoid this scenario (https://github.com/google/ground-android/issues/24). If it's a non-issue could kindly clarify?

Thanks in advance!

@florina-muntenescu @JoseAlcerreca @yigit

gino-m avatar Apr 30 '19 03:04 gino-m