Garbage Collector

A garbage collector is a feature for automating memory management on behalf of the programmer, by attempting to reclaim memory occupied by objects that are no longer in use by the program.

Some programming languages offer garbage collection out of the box (Golang, Java & JavaScript, C#, Python). Other languages require manual memory management (C, C++, Zig). In these cases, it is also possible to develop your own garbage collector.