GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

Search e01

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

5 results across 6 corpora for DisposableStack.prototype.move().

Developer library 5

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

DisposableStack

The **`DisposableStack`** object represents a stack of [disposers](/docs/Web/JavaScript/Reference/Statements/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 `DisposableStack` and prevent registering any

DisposableStack.prototype.disposed

The **`disposed`** accessor property of DisposableStack instances returns a boolean indicating whether or not this `DisposableStack` has been disposed or moved by doing any of the following: - Calling its dispose() method - Calling its move() method - Declaring it with using and letting the variable go out of scope, which automatically calls the [`[Symbol.dispose]()`](/docs/Web/JavaScript/Reference/Global_Objects/Di

DisposableStack.prototype.move()

The **`move()`** method of DisposableStack instances creates a new `DisposableStack` instance that contains the same disposers as this stack, and then marks this stack as disposed, without calling any disposers. ## Syntax ```js-nolint move() ``` ### Parameters None. ### Return value A new DisposableStack instance. ### Exceptions - ReferenceError - : Thrown if the stack is already disposed. ## Description

JavaScript resource management

ome gotchas when conflating scopes with resource lifetime. See [`using`](/docs/Web/JavaScript/Reference/Statements/using#examples) for a few examples. ## The `DisposableStack` and `AsyncDisposableStack` objects `using` and `await using` are special syntaxes. Syntaxes are convenient and hide a lot of the complexity, but sometimes you need to do things manually. For one common example: what if you don't want to disp

JSON results · Services directory