Garbage collection

The garbage collection (GC) proposal is currently in Phase 1. We discussed garbage collection in the What are the Limitations? section of Chapter 1What is WebAssembly? The proposal documentation at https://github.com/WebAssembly/gc/blob/master/proposals/gc/Overview.md provides an extensive overview of the feature and describes the elements that need to be added to the specification. Eberhardt provides the following description of the proposal in his blog post:

"This proposal adds GC capabilities to WebAssembly. Interestingly, it will not have its own GC, instead it will integrate with the GC provided by the host environment. This makes a lot of sense as this, and various other proposals (host bindings, reference types), are designed to improve the interop with the host, making it easier to share state and call APIs. Having a single GC to manage memory makes this much easier."

This feature will require a great deal of effort to implement, but adding it to WebAssembly will be worth the effort. Let's wrap up this section with a feature currently in the implementation phase: reference types.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset