You still write `finally { resource.close() }`. The `using` keyword does it automatically.
🔒
https://dev.to
«You've written this pattern — or something close to it — many times:
const timer = setTimeout(flush, 5000);
try {
await doWork();
} finally {
clearTimeout(timer);
}
The cleanup is real and necessary. But it'...»
Automatische Weiterleitung...
1.5s