Hacker News new | ask | show | jobs
by titzer 1320 days ago
This is the use case for weak maps, which both Java and JavaScript have. In the latter case, the map is not iterable, so one cannot observe JavaScript GC (through WeakMap at least).