1 package leakcanary 2 3 import android.os.Debug 4 import java.io.File 5 6 /** 7 * Dumps the Android heap using [Debug.dumpHprofData]. 8 * 9 * Note: despite being part of the Debug class, [Debug.dumpHprofData] can be called from non 10 * debuggable non profileable builds. 11 */ 12 object AndroidDebugHeapDumper : HeapDumper { dumpHeapnull13 override fun dumpHeap(heapDumpFile: File) { 14 Debug.dumpHprofData(heapDumpFile.absolutePath) 15 } 16 } 17