release

abstract fun release(source: String, reason: String = "")

Release a reference. When the last reference is released, the object is disposed.

Parameters

source

A string indicating the source of the acquisition, for logging purposes, e.g. "MyActivity".

reason

An optional string indicating the reason for the release, for logging purposes.

Throws

If the object has already been disposed.