watchReference

abstract fun watchReference(reference: Any, note: String)

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

This function is safe to call from any thread.

Parameters

note

Information about why reference is being watched.