Closed dmytrodanylyk closed 6 years ago
Indeed, the ViewModel which would outlive the activity, could prevent the latter to be garbage collected and then would start leaking memory. When destroyed, the activity or fragment terminates its streams and unsubscribe from the ViewModel so no problem here.
Hi,
The official Android documentation says:
I didn't dive deeply into MVI architecture and your code yet, but looks like View Model is observing events from Activty, which means it has a reference to activty.
Is it done intentional?