close

fun close(vararg objects: AutoCloseable)

Closes all given AutoCloseables. Some of the objects may be null; they are ignored. After everything is closed, throws the first exception encountered, or completes normally if none.


@JvmName(name = "closeNullable")
fun close(vararg objects: AutoCloseable?)


Closes all given AutoCloseables. :contentReferenceoaicite:0{index=0}

See also

#close(vararg AutoCloseable)