Sorry I’m having issue with dagger 2, crash OOM wh...
# dagger
l
Sorry I’m having issue with dagger 2, crash OOM when app uses multiple fragments, it seems viewmodel is destroyed, but data is still referenced here, and it causes memory leak?
init ở activity;
init fragment:
h
Your ViewModel is crashing, nothing related to Dagger, you have a memory leak in your ViewModel
l
The issue I detected is when the fragment is detected the viewmodel has oncleared data in the viewmodel and still holds the reference.
When entering a screen, the viewmodel is continuously created with a new instance.
l
It’s hard to have a proper answer. If you are still facing this issue probably it will be better if we have a GitHub project to reproduce that. Thank