DeletableObjectReporter

Functions

Link copied to clipboard
abstract fun expectDeletionFor(target: Any, reason: String): TrackedObjectReachability

Start tracking the provided target object, with the expectation that it should be eligible for automatic garbage collection soon, i.e. stop being strongly reachable soon. If target stays strongly reachable, target will be considered retained. The time at which target is considered retained is determined by the DeletableObjectReporter implementation.

Link copied to clipboard

Creates a wrapper around DeletableObjectReporter that will run any instance of T by apply to decide whether to forward to DeletableObjectReporter.expectDeletionFor calls. Objects that do not extend T will always be forwarded.