Texonom
Texonom
/
Engineering
Engineering
/Software Engineering/Programming/Programming Language/Programming Languages/4GL/ECMAScript/
JavaScript
JavaScript
/JS Fundamental/
JS Disposable
Search

JS Disposable

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2024 May 8 3:45
Editor
Editor
Seonglae ChoSeonglae Cho
Edited
Edited
2024 May 8 4:2
Refs
Refs

Explicit Resource Management

Dispose resources like FileReader, Stream, Database, Network object
  • Symbol.dispose
  • Symbol.asyncDispose
JS Disposable Usages
JS using
 
 

Classes

Common
.use() function
.adopt() function
.defer() function
  • DisposableStack
    • .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.
New Disposable APIs in Javascript | Jonathan's Blog
https://jonathan-frere.com/posts/disposables-in-javascript/
New Disposable APIs in Javascript | Jonathan's Blog
 
 

Recommendations

Texonom
Texonom
/
Engineering
Engineering
/Software Engineering/Programming/Programming Language/Programming Languages/4GL/ECMAScript/
JavaScript
JavaScript
/JS Fundamental/
JS Disposable
Copyright Seonglae Cho