Identify Memory Leak in Android

Android Memory Leak Test

 1. Open the ddms (Dalvik Debug Monitor Service) 2. Select the required process name in the left panel 3. Click on Show heap Updates button 4. In the right panel select VM heap 5. Click on dump HPROF file 6. Save in desktop 7. Open the command prompt 6. Set the path to sdk tools folder 7. write the command[Syntax – hprof-conv <infile> <outfile>]hprof-conv.exe “saved file path” “C:\file.hprof”

8. Download Eclipse MAT plugin
9. Open the saved HPROF file using MAT  





10. There are various views available , using that you can detect the class which is using more memory

Post a Comment

0 Comments