Skip to content
🤔 Documentation issue? Report it

//leakcanary/shark/HprofHeapGraph/Companion/openHeapGraph

openHeapGraph

fun File.openHeapGraph(proguardMapping: ProguardMapping? = null, indexedGcRootTypes: Set<HprofRecordTag> = HprofIndex.defaultIndexedGcRootTags()): CloseableHeapGraph

A facility for opening a CloseableHeapGraph from a File. This first parses the file headers with HprofHeader.parseHeaderOf, then indexes the file content with HprofIndex.indexRecordsOf and then opens a CloseableHeapGraph from the index, which you are responsible for closing after using.

fun DualSourceProvider.openHeapGraph(proguardMapping: ProguardMapping? = null, indexedGcRootTypes: Set<HprofRecordTag> = HprofIndex.defaultIndexedGcRootTags()): CloseableHeapGraph