It is optimized for `Closable` but possible to use with any type having a `close()` method.