defuse[T <: AnyRef { def close(): Unit }, R](resource: T)(block: (T) ⇒ R): R
Safely executes a given block on this resource.
Safely executes a given block on this resource.
The resource is guaranteed to be closed after the method returns,
regardless of whether an exception is thrown or not.