I have a project which integrated LeakCanary
to detect memory leaks. I know it used HAHA
to dump memory to hprof
files to detect leaks.
But every single time I Run app from Android Studio, it trigger dumping process and create a new hprof
file which has about 60-70
MBs of size.
By the time it cause my device to full of memory. And when I tried to delete leak logs in Leaks app, some off hprof
files were NOT cleaned (it has _pending
in the file name) like the image below. I must manually delete it.
I'm new to LeakCanary, please help me how can I decrease the frequency of dumping process and how can I clean all the hprof
files automatically.