Message from JavaScript discussions

November 2018

— The gc thread operates in an opposite way


If there is no reachability, memory is freed, it does not assume reachability in the dependency tree

— 1 thread traverses the tree to do dynamic analysis, then gc itself is done on main thread

— It’s not impossible to understand, for the gc algorithm

— But it happens

— If you repeat this step, and replace the number with a big array or something, memory will increase as you keep running it

Message permanent page

— The only thing is static analysis

— Even if the function doesn't reference the array

— But with the modern models, i think neither that can be the exception

— Gc analyzes while the code is running

— Yes, sure

— But it can't figure out this case