

The very concept of garbage collection as a form of automated management was invented by John McCarthy for LISP in 1959.

That was all done automatically by a garbage collector. In LISP you could work with dynamically-sized data structures without having to declare limits on their sizes upfront and without having to write code to allocate and free up the underlying memory.

This left it up to developers to write explicit code that allocates and frees memory in the heap. PL/I in 1966 and Algol-68 were the first two major languages that added the concept of dynamically allocated memory as we know it today, establishing the tradition of manual memory management. This made things easy and simple, but it limited software to working with data of fixed sizes, and limits on the number of processed items had to be hard-coded in the source code. Developers did not have to think about memory allocation and deallocation at run time, as memory was either always allocated (statically) or automatically managed (via the stack) and nothing had to be done “manually”. All the memory was either statically or stack allocated. Early programming languages did not have the concept of a heap at all. The very concept of automatic memory management is as old as programming languages.

