JavaScript Jabber cover image

Things JavaScript Developers Should Know, Part 2 - JSJ 485

JavaScript Jabber

00:00

Using a Weak Map to Clean Up a Phone Number

The map that maps uses t phones, i would use a weak map. So even though the value is a strong reference, or regular reference, actually a because the key is gone, the map will let it go,. And vice versa, right? If you clean up the company, you don't want to have to go through and explicitly rmove references to the the people  because we have garbage collection. That's essentially what you're talking about here.

Play episode from 47:01
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app