closeAutoCloseable

fun <T> closeAutoCloseable(data: T)

Closes all AutoCloseable members of the data.

If the data is null, nothing happens. If the data is AutoCloseable, it is closed. If the data is some kind of container, all its elements are recursively closed.