|
|
|
|
|
by cogman10
169 days ago
|
|
Java's is try (var foo = new Foo()) {
}
// foo.close() is called here.
I like the Java method for things like files because if the there's an exception during the close of a file, the regular `IOException` block handles that error the same as it handles a read or write error. |
|