use

fun <T : Disposable?> use(value: T): T(source)

Adds a disposable resource to the stack, returning the resource.

Parameters

value

The resource to add. null and undefined will not be added, but will be returned.