main

square/leakcanary

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

DetectLeaksInterceptor.kt

TLDR

This file provides an interface DetectLeaksInterceptor that is responsible for deciding whether to dump and analyze the heap for leaks in instrumentation tests.

Methods

There are no methods in this file.

package leakcanary

/**
 * Decides whether to dump & analyze the heap to look for leaks in instrumentation tests.
 * The implementation might block for a while to allow temporary leaks to be flushed out, as those
 * aren't that interesting to report and heap analysis increases test duration significantly.
 */
fun interface DetectLeaksInterceptor {
  fun waitUntilReadyForHeapAnalysis(): HeapAnalysisDecision
}