Added in API level 33

Cleanable

interface Cleanable
java.lang.ref.Cleaner.Cleanable

Cleanable represents an object and a cleaning action registered in a Cleaner.

Summary

Public methods
abstract Unit

Unregisters the cleanable and invokes the cleaning action.

Public methods

clean

Added in API level 33
abstract fun clean(): Unit

Unregisters the cleanable and invokes the cleaning action. The cleanable's cleaning action is invoked at most once regardless of the number of calls to clean.