GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

Search e01

One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.

6 results across 6 corpora for DisposableStack.

Developer library 6

Firefox 141 release notes for developers

1970161)). - The explicit [resource management](/docs/Web/JavaScript/Guide/Resource_management) API, which includes the using and await using declarations, the DisposableStack, AsyncDisposableStack, and SuppressedError objects, and the Symbol.dispose and Symbol.asyncDispose well-known symbols, is now supported. These features ensure automatic cleanup of resources such as file handles or stream readers when they go ou

JavaScript reference

# Control abstraction objects - Iterator - AsyncIterator - Promise - GeneratorFunction - AsyncGeneratorFunction - Generator - AsyncGenerator - AsyncFunction - DisposableStack - AsyncDisposableStack ### Reflection - AbstractModuleSource - Reflect - Proxy ### Internationalization - Intl - Intl.Collator - Intl.DateTimeFormat - Intl.DisplayNames - Intl.DurationFormat - Intl.ListFormat - Intl.Locale - Intl.NumberForm

MDN Web Docs mirror · CC BY-SA 2.5 (MDN) · https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference

using

xamples where it may not behave how you expect. If you want to hand-manage resource disposal, while maintaining the same error handling guarantees, you can use DisposableStack instead. ## Examples In the following examples, we assume a simple `Resource` class that has a `getValue` method and a `[Symbol.dispose]()` method: ```js class Resource { value = Math.random(); #isDisposed = false; getValue() { if

Standard built-in objects

sted callbacks, for example). - Iterator - AsyncIterator - Promise - GeneratorFunction - AsyncGeneratorFunction - Generator - AsyncGenerator - AsyncFunction - DisposableStack - AsyncDisposableStack ### Reflection - AbstractModuleSource - Reflect - Proxy ### Internationalization Additions to the ECMAScript core for language-sensitive functionalities. - Intl - Intl.Collator - Intl.DateTimeFormat - Intl.DisplayNam

AsyncDisposableStack

The **`AsyncDisposableStack`** object represents a stack of [async disposers](/docs/Web/JavaScript/Reference/Statements/await_using) to run when the stack itself is disposed. Disposer functions are executed in reverse order of registration, with strong error handling guarantees. Calling its `move()` method will transfer responsibility for calling the current registered disposers to a new `AsyncDisposableStack` and pr

AsyncDisposableStack.prototype.defer()

The **`defer()`** method of AsyncDisposableStack instances takes a callback function to be called and awaited when the stack is disposed. See DisposableStack.prototype.defer() for general information about the `defer()` method. ## Syntax ```js-nolint defer(onDispose) ``` ### Parameters - `onDispose` - : A function that will be called when the stack is disposed. The function receives no arguments and can return

JSON results · Services directory