-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Weak References by default #3384
Comments
Both reference types and multi-value are finished proposals and stable on all browsers for a long time now. Multi-value is a bit more involved because it requires compiler support, which is currently broken anyway, but at least reference types can be enabled by default next to weak references too. |
Apparently there are runtimes, e.g. serverless, that don't support weak references. So I'm not sure if we can enable this by default without a breaking change. |
Could we use feature detection for WeakRef? Then we would avoid breaking old browsers and serverless while making it available to most browsers |
I never looked into what |
Motivation
WeakRef is now supported by all mainstream browsers: https://caniuse.com/mdn-javascript_builtins_weakref
Proposed Solution
Remove
WASM_BINDGEN_WEAKREF
and set the default value to true.Alternatives
Leak memory forever.. :)
Additional Context
N/A
The text was updated successfully, but these errors were encountered: