Skip to content

[Suggestion] Use Symbol.dispose to replace our own Disposable #640

@yume-chan

Description

@yume-chan

Pre-issue checklist

  • I've searched the issue list but couldn't find the feature I want

How can Tango be improved?

The Explicit resource management proposal adds primitives for disposable pattern.

However, using it requires a polyfill as browser support is not good now.

Symbol.dispose and Symbol.asyncDispose can be easily polyfilled, but not for DisposableStack. I also don't like https://github.com/es-shims/DisposableStack, I don't need a ES3 compatible polyfill with millions of dependencies.

How should the API change?

Add our own polyfills, and refactor disposables to use those primitives.

(Optional) Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions