androidandroid-studiomemory-leaksout-of-memoryandroid-profiler

After getting Class Instance List, how to get exact point of Memory leak in Reference using Android Studio Profiler?


I have memory leaks in my project. To find out leaks, I have decided to use Android Studio Profiler. After a lot of research about it. I stuck in between Instance List and Reference how to identify exact leak point.

Below is the screen shot of my profiler:

Memory Profiler

Please help me to understand exact leak cause to avoid Memory Leaks.

Thanks in Advance.


Solution

  • Android Studio's memory profiler detects a specific class of leaks when you retain an activity or fragment past its life cycle.

    The References tab shows how the leaked activity or fragment is being retained. You can try clicking on Show nearest GC root only to see the shortest path to GC root, which may give you some insight into how to stop retaining the object and eliminate the leak.