Weak references
Widely available since 2023-10-26
The WeakRef
and FinalizationRegistry
objects hold references to garbage-collectable objects without creating strong references that prevent their garbage collection.
Learning resources on MDN
Browser support
- Chrome 84 Released on 2020-07-27
- Chrome Android 84 Released on 2020-07-27
- Edge 84 Released on 2020-07-16
- Firefox 79 Released on 2020-07-28
- Firefox for Android 79 Released on 2020-07-28
- Safari 14.1 Released on 2021-04-26
- Safari on iOS 14.5 Released on 2021-04-26
Specifications
- ECMAScript Language Specification (#sec-managing-memory), from TC39 (Ecma International).