Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The Symbol.dispose static data property represents the well-known symbol Symbol.dispose. The using declaration looks up this symbol on the variable initializer for the method to call when the variable goes out of scope.
The well-known symbol Symbol.dispose.
| Writable | no |
| Enumerable | no |
| Configurable | no |
An object is disposable if it has the [Symbol.dispose]() method. The method is expected to have the following semantics:
This method should not return a promise, as promises returned by [Symbol.dispose]() are not awaited by await using. To declare async disposables, use Symbol.asyncDispose.
[Symbol.dispose] allows the creation of custom disposables. See the using reference for more information.
| ECMAScript Async Explicit Resource Management # table-1 |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Aug 2, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.