?
What is the central concept of JavaScript memory management?
Answer & Solution
Correct Answer:
Option
B
The central concept of JavaScript memory management is a concept of reachability.
1. A distinguished set of objects are assumed to be reachable: these are known as the roots. Typically, these include all the objects referenced from anywhere in the call stack (that is, all local variables and parameters in the functions currently being invoked), and any global variables.
2. Objects are kept in memory while they are accessible from roots through a reference or a chain of references.
1. A distinguished set of objects are assumed to be reachable: these are known as the roots. Typically, these include all the objects referenced from anywhere in the call stack (that is, all local variables and parameters in the functions currently being invoked), and any global variables.
2. Objects are kept in memory while they are accessible from roots through a reference or a chain of references.
Join the Discussion
Login to post a comment or share your explanation.
Login