Even if we wanted to micro-manage memory, we have no way of fully ensuring the JS JIT engine. We have to rely on the Garbage Collection. When the garbage collection is running, it stops the main thread. Nothing else runs. var x = { // ...};