According to this answer on a related question, it's best to make an object explicitly unavailable if you want them to be garbage-collected.
For all practical intents and purposes, does it matter whether that's done with a null
value or an undefined
value?
Shortly put, will both of the below objects (whatever they may have referenced originally) be equally accessible for the garbage collector?
window.foo = null;
window.bar = void 0;