4 ms·
I was under the impression that if you have a reference to an object it won't be GCed. Is that not the case?
by coopsmgoops 6y ago
I was under the impression that if you have a reference to an object it won't be GCed. Is that not the case?
- kamikaz1k 6y agoThe article is talking about ensuring you have no dangling references, a.k.a. memory leak.
- stevula 6y agoCheck out WeakMap and related weak- data structures. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...