Year round learning for web and digital professionals

Web Directions Global Scope ’22 session spotlight–Strength in weakness: JavaScript memory management and weak references

Strength in weakness: JavaScript memory management and weak references

Garbage Collection (GC) in JavaScript is supposed to simplify and automate memory management. But it turns out that there are various scenarios where GC can get in the way, and avoiding resource leaks becomes challenging. In order to overcome such issues, the ECMAScript standard includes WeakMap and WeakSet. More recently, ES2021 introduced WeakRef and FinalizationRegistry for even more fine-grained control, and they are already supported by all modern browsers. In this presentation I explain what these are, why they’re needed, and provide concrete usage examples and best practices.

Dan Shappir

Dan Shappir is the Performance Tech Lead at Next Insurance, and previously held that position at Wix.com. Dan has over 25 years of software development experience, and has worked on systems ranging from multiuser games to missile trajectory simulations to designing and building large-scale Web applications used by hundreds of millions of users. He is a frequent speaker at technical conferences, a host and panelist on JavaScript Jabber podcast, and an Invited Expert on the W3C Web Performance Working Group. Dan holds an MSc in Computer Science.

banner for for Global Scope conference. Text reads: Strength in weakness: JavaScript memory management and weak references Dan Shappir Performance Tech Lead Next Insurance Web Directions global scope 2022 100% JavaScript

delivering year round learning for front end and full stack professionals

Learn more about us

I’ve been admiring the Web Directions events for years, and was honored to be part… What a fantastic event!

Ethan Marcotte Inventor of 'Responsive Web Design'