Loading...
let x = { a: 1 };
let y = { b: 2, ref: x };
let z = { c: 3 };
y.ref = null;
z = null;
// GC runs: mark from roots, sweep unreachable
console.log(x.a);
no roots
empty
No output yet.