Explicit Resource Management
Dispose resources like FileReader, Stream, Database, Network object
Symbol.dispose
Symbol.asyncDispose
JS Disposable Usages
Classes
Common
.use() function.adopt() function.defer() functionDisposableStack.dispose()
AsyncDisposableStack.disposeAsync()
New Disposable APIs in Javascript | Jonathan's Blog
Javascript’s new “Explicit Resource Management” proposal adds the using statement, a way to automatically close resources after you’ve finished using them. But as part of the same proposal, a number of other APIs have been added that make using even more useful. I couldn’t find a lot of documentation out there when I was trying to figure out how these APIs work, so this article is a bit of an overview of getting started with using, Disposables, and explicit resource management.
https://jonathan-frere.com/posts/disposables-in-javascript/


Seonglae Cho