Like acquireReleaseWith
, safely wraps a use and release of a resource.
Like acquireReleaseWith
, safely wraps a use and release of a resource.
This resource will get automatically closed, because it implements
AutoCloseable
.
Like withFinalizer, add a finalizer from AutoClosable.