# 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](https://www.ask-codey.com/glossary?category=javascript&level=5)

Updated: November 9, 2026

## In other subjects

- [Garbage Collection in C#](https://www.ask-codey.com/glossary/garbage-collection-c-sharp)
- [Garbage collection in Git](https://www.ask-codey.com/glossary/garbage-collection-git)
- [Garbage Collection in Java](https://www.ask-codey.com/glossary/garbage-collection)

Source: https://www.ask-codey.com/glossary/garbage-collection-javascript
