1 Repeatedly allocating and deallocating many JavaScript objects forces the garbage collector to run and free memory that was previously referenced.
“To force the garbage collector to kick in right now, we can use the function which just allocates and removes a lot of objects. And when you do this a couple of times you can be fairly certain that the garbage collector did the work.”