Skip to content
Advertisement

Tag: garbage-collection

What is Liveness in JavaScript?

Trying to examine intricacies of JavaScript GC, I got deep into the weeds (that is, into the ECMAScript spec). It was found by me that an object should not be collected as long as it is deemed “live”. And liveness itself is defined as follows: At any point during evaluation, a set of objects S is considered live if either

How to iterate over a WeakMap?

A JavaScript WeakMap does not allow you to get the key, or the length or size, by design. Is it possible to nevertheless loop over entries in some way ? If not .. how does the Chrome console do this ? Answer Is it possible to nevertheless loop over entries in some way? No, as you say, the contents of

Advertisement