Garbage collection (WebAssembly)Baseline · Newly available
Garbage collection tracks references for better memory management with garbage-collected languages running in WebAssmbly.
Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Dec 11, 2024.
Browser support
DesktopChrome
1–118Not supported
119+Supportedsince Oct 31, 2023
Current: 155Edge
12–118Not supported
119+Supportedsince Nov 2, 2023
Current: 154Firefox
1–119Not supported
120+Supportedsince Nov 21, 2023
Current: 157Safari
1–18.1Not supported
18.2+Supportedsince Dec 11, 2024
Current: 27MobileChrome Android
18–118Not supported
119+Supportedsince Oct 31, 2023
Current: 155Firefox Android
4–119Not supported
120+Supportedsince Nov 21, 2023
Current: 157Safari iOS
1–18.1Not supported
18.2+Supportedsince Dec 11, 2024
Current: 27How to use
Every current browser supports this, but it only became Baseline on Dec 11, 2024. Use it as a progressive enhancement, or keep a fallback if you support older devices.
Example
Full syntax and examples are on MDN — see the links below.
Feature detection
There’s no simple runtime check for this feature; rely on the support table and test in your target browsers.