Closeable
@API(status = API.Status.STABLE, since = "2.7.1")
An atomic reference value, which has methods that define its creation and disposal / being closed. This class should be used as an anonymous object such as:
val closeable = object : Closeable<Type>() {
override fun create(): T {
// create and return T
}
override fun onClose() {
// dispose of T
}
Content copied to clipboard