main

square/leakcanary

Last updated at: 29/12/2023 09:37

HeapDumper.kt

TLDR

The HeapDumper interface defines a method for dumping the heap, which is expected to be blocking until the heap is dumped or heap dumping fails.

Methods

dumpHeap

This method is responsible for dumping the heap. The implementation is expected to be blocking until the heap is dumped or heap dumping fails.

END

package leakcanary

import java.io.File

fun interface HeapDumper {

  /**
   * Dumps the heap. The implementation is expected to be blocking until the heap is dumped
   * or heap dumping failed.
   *
   * Implementations can throw a runtime exception if heap dumping failed.
   */
  fun dumpHeap(heapDumpFile: File)
}