Comments (3)
Possible workaround is to keep strong reference to the subscription.
I would prefer not to move listener to Operator because in this case we create lifecycle where it should not be. We can not fully solve this issue such way. In any case we should keep strong ref to listener, keeping it explicitly in operator, or implicitly in subscription.
from rxandroid.
Totally agree with @Yarikx. fromSharedPreferencesChanges
implemented properly and holds a reference to the listener as long as it's needed. The api consumer is the one who responsible for keeping a reference to the Subscription
and canceling it when necessary.
from rxandroid.
Thank you for detailed explanation. It's clear now.
from rxandroid.
Related Issues (20)
- BUG with gradle 3.6.1 and RxJava and RxAndroid 3.0.0 HOT 2
- RX Android & Release apk HOT 1
- RxAndroid
- HandlerScheduler throws NPE on schedule() in tests HOT 4
- AndroidRuntime: FATAL EXCEPTION -> observeOn(AndroidSchedulers.mainThread()) HOT 5
- Bug or Help Long running observable in background crashes app HOT 1
- [email protected]: Permission denied (publickey). HOT 1
- java.lang.NoSuchMethodError HOT 17
- IllegalAccessError: FlowableDoOnLifecycle: 2.2.3 HOT 1
- docs/content/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request.md
- Gi
- issue with the indirect dependency component reactive-stream License HOT 2
- Does RxAndroid have any plans to release a new version? HOT 1
- Add Sonatype secrets to repo for GitHub Actions usage HOT 9
- RxAndroid 3.0.1 NPE in JVM unit tests HOT 1
- ERROR: Failed to resolve: io.reactivex.rxjava3:rxandroid:3.0.2 HOT 5
- Sms2
- Why the HandlerScheduler class overrides scheduleDirect. It's not more explicit to let the HandlerWorker do the work HOT 4
- Kotlin multiplaform support HOT 2
- I would like to know when will you publish a new version? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxandroid.