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?
lam bui
09/20/2024, 7:24 AM
init ở activity;
lam bui
09/20/2024, 7:27 AM
init fragment:
h
Hristijan
09/20/2024, 7:29 AM
Your ViewModel is crashing, nothing related to Dagger, you have a memory leak in your ViewModel
l
lam bui
09/20/2024, 7:31 AM
The issue I detected is when the fragment is detected the viewmodel has oncleared data in the viewmodel and still holds the reference.
lam bui
09/20/2024, 7:32 AM
When entering a screen, the viewmodel is continuously created with a new instance.
l
Leo N
02/16/2025, 3:21 PM
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