Garbage Collection

noun

say it: “GAR-bij kuh-LEK-shun” /ˈɡɑːrbɪdʒ kəˈlɛkʃən/

JavaScript's automatic cleanup, which frees the memory of values that no part of the program can reach anymore.

What is Garbage Collection in JavaScript?

Garbage Collection — Automatic recovery of heap memory from objects a program can no longer reach.

In a sentence

  • “Once nothing pointed to the old shopping cart object, garbage collection freed its memory.”

Level: Master · More JavaScript terms at this level

Updated

In other subjects