In This Article

  1. Introduction
  2. Memory life cycle
    1. Allocation in JavaScript
      1. Value initialization
      2. Allocation via function calls
    2. Using values
    3. Release when the memory is not needed anymore
  3. Garbage collection
    1. References
    2. Reference-counting garbage collection
      1. Example
      2. Limitation: cycles
      3. Real-life example
    3. Mark-and-sweep algorithm
      1. Cycles are not a problem anymore
      2. Limitation: objects need to be made explicitly unreachable
  4. See also