main

square/leakcanary

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

ReachabilityWatcher.kt

TLDR

This file defines the ReachabilityWatcher interface, which includes a method called expectWeaklyReachable that expects an object to become weakly reachable soon.

Methods

expectWeaklyReachable

This method expects the provided object to become weakly reachable soon. If not, the object will be considered retained.

Classes

package leakcanary

fun interface ReachabilityWatcher {

  /**
   * Expects the provided [watchedObject] to become weakly reachable soon. If not,
   * [watchedObject] will be considered retained.
   */
  fun expectWeaklyReachable(
    watchedObject: Any,
    description: String
  )
}