JavaScript engines apply many optimizations to make it run faster and not introduce any delays into the code execution. That’s the concept of how garbage collection works. We can also imagine the process as spilling a huge bucket of paint from the roots, that flows through all references and marks all reachable objects. It monitors all objects and removes those that have become unreachable. There’s a background process in the JavaScript engine that is called garbage collector. And those that it references are also reachable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |