I am a newbie on this topic so i researched about MAT on internet but the articles were quite old,and there was something about creating a heap dump and manually converting the file into some other format etc etc.....but as soon as i click on heap dump i get this

enter image description here

so i am guessing that i don't need to convert it anymore or do i??

and i would like to ask that my app takes about 40-120 mb ram.the size keeps increasing due to memory leaks how to find out which variable is causing it?can we even find out memory allocations for separate variables ?

有帮助吗?

解决方案

You don't need to convert it any more, hprof is more than enough to find memory leaks

In MAT you click on Histogram and dominator_tree menu. Both will show you list of runtime objects and respective size of retained heap. You can easily get start up point for code analysis based on retained heap size and get to the root of memory leak.

Also, if you click on leak suspects you will get list of problem suspects.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top