Hacker News new | past | comments | ask | show | jobs | submit login

One of the slides mentions WeakMap. The issue with them is that they have weak keys, not weak values. If you're trying to keep track of weak values (say to prevent duplicate instantiations of managed objects, while still allowing them to be garbage collected, for example), WeakMap won't work.

https://developer.mozilla.org/en-US/docs/JavaScript/Referenc...

Is there any work to add weak values to JavaScript? There's a node module, but nothing for client-side code.

https://github.com/TooTallNate/node-weak




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: