JavaScript Memory Management

  • Sammie Bae


In any program, a variable takes up some memory of the CPU. In low-level programming languages such as C, the programmer must allocate and delete memory manually. In contrast, the V8 JavaScript engine and other modern JavaScript engines have garbage collectors that delete unused variables for the programmer. Despite this memory management done by the JavaScript engine, however, there are common pitfalls that developers can fall into. This chapter will show some basic examples of these pitfalls and present techniques to help the garbage collector minimize the key JavaScript memory problems.

Copyright information

© Sammie Bae 2019

Authors and Affiliations

  • Sammie Bae
    • 1
  1. 1.HamiltonCanada

Personalised recommendations