AI engineering glossary · Computing foundations
What is garbage collection?
Garbage collection: Automatic memory management in which a language runtime finds objects a program can no longer reach and frees their memory. It spares programmers from releasing memory by hand, at the cost of some overhead and occasional pauses.
Garbage collection: an example
When you overwrite the only variable pointing to a large list in Python, its memory is soon reclaimed automatically.
Related terms
More Computing foundations terms
- Global interpreter lock
- Graphical user interface
- Graphics processing unit
- Half-precision floating point
- Hard disk drive
- Hard link
- Hash function
- Heap
Where you learn it
Garbage collection is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.