LeakDetector

Watch references and detect when they leak.

Types

Link copied to clipboard
fun interface Callback
Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun awaitClose()

Suspend until all current watched references are either collected or detected as a leak, and throw an exception for any new calls to watchReference.

Link copied to clipboard
abstract override fun close()

Immediately stop all leak detection of current watched references, and throw an exception for any new calls to watchReference.

Link copied to clipboard
abstract fun watchReference(reference: Any, note: String)

Add reference as a watched instance that is expected to be garbage collected soon.