onClose

inline fun <T : AutoCloseable> T.onClose(scope: CloseableScopeRegistrar, name: String? = null): T

Extension function for simple AutoCloseable registration in closeable scope