Term of the Moment

Amazon Key


Look Up Another Term


Definition: memory leak


A condition caused by a program that does not free up the extra memory it allocates. In programming languages, such as C/C++, the programmer can dynamically allocate additional memory to hold data and variables that are required for the moment, but not used throughout the program. When those memory areas are no longer needed, the programmer must remember to deallocate them.

When memory is allocated, but not deallocated, a memory leak occurs (the memory has leaked out of the computer). If too many memory leaks occur, they can usurp all of memory and bring everything to a halt or slow the processing considerably. In other environments, such as Java, the operating system allocates and deallocates memory automatically. Specifically allocating and deallocating memory, while error prone (in case one forgets to deallocate), allows the programmer more control over the computer's resources. See garbage collection.