Fixed
Status Update
Comments
[Deleted User] <[Deleted User]> #2
Yigit, do you have time to fix it?
reemission of the same liveData is racy
reemission of the same liveData is racy
il...@google.com <il...@google.com>
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #3
yea i'll take it.
il...@google.com <il...@google.com> #4
Thanks for the detailed analysis. This may not be an issue anymore since we've started using Main.immediate there but I' not sure; I'll try to create a test case.
Description
Observation #2: LifecycleRegistry.moveToState(next) immediately returns if next state == current state.
Therefore any observer remaining in LifecycleRegistry's mObserverMap is completely useless and will never be notified again after the LifecycleRegistry has reached State.DESTROYED.
Please clear mObserverMap when LifecycleRegistry reaches State.DESTROYED, allowing the observers to be garbage collected immediately.