e01.org

Garbage collection

Garbage collection is a term used in computer programming to describe the process of finding and deleting objects which are no longer being referenced by other objects.

**[Garbage collection](/docs/Web/JavaScript/Guide/Memory_management#garbage_collection)** is a term used in computer programming to describe the process of finding and deleting objects which are no longer being referenced by other objects.

In other words, garbage collection is the process of removing any objects which are not being used by any other objects. Often abbreviated "GC," garbage collection is a fundamental component of the [memory management](/docs/Web/JavaScript/Guide/Memory_management) system used by JavaScript.

## See also

- [Memory management](https://en.wikipedia.org/wiki/Memory_management) on Wikipedia
- [Garbage collection (computer science)](<https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)>) on Wikipedia
- [Garbage collection](/docs/Web/JavaScript/Guide/Memory_management#garbage_collection) in the MDN JavaScript guide.
- [Memory management in JavaScript](/docs/Web/JavaScript/Guide/Memory_management)

source: MDN Web Docs mirror · page

Cite this

"Garbage collection". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Glossary/Garbage_collection

JSON record · API collection · citation policy