Web Directions Global Scope 2022 All about JavaScript the language

Session Details

Dan Shappir

Strength in weakness: JavaScript memory management and weak references

Dan Shappir Performance Tech Lead Next Insurance

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.

Don't miss your chance to see Dan Shappir and many other inspiring speakers at Global Scope.

Tickets start at $195.

Register Now

a conference all about JavaScript the language

Register Now

Code of Conduct

For over a decade, we've worked hard to create inclusive, fun, inspring and safe events for the Web Industry.

As part of our commitment to these values, we've adopted a code of conduct for all involved: ourselves, our speakers, our partners and our audience.

If you have any concern or feedback, please don't hesitate to contact us.