Memory Leaks in Android - Fast Pace App Usage

61 Views Asked by At

I am currently developing an app and I am encountering some memory leak issues. I am using leak canary to detect them. My problem is, when I use the app like a normal human would o, leak canary detects retained objects but after 1-2 seconds, it says "All retained objects have been garbage collected" so all is good. But, when I switch between fragments so fast, leak canary gives me some memory leak problems even though I set bindings, objects etc. to null and remove all observers of view model etc. I use lifecyclescope to make sure all threads are cancelled when view is destroyed. When I use the app in a normal pace, no memory leak is being detected, they are being collected by garbage collector, but when I use the app in a fast pace I get 5-6 leak messages. Should I be worried about this? Should I still try to prevent memory leaks in a fast pace app usage?

0

There are 0 best solutions below