
shared memory) that is not released, even when the program terminates
where the program is able to request memory (e.g. where new memory is allocated frequently, such as when rendering the frames of a computer game or animated video. where the program is left running, and consumes more and more memory over time (such as background tasks, on servers, but especially in embedded devices which may be left running for many years). This means that a memory leak in a program that only runs for a short time is rarely serious.Ĭases where leaks are much more serious include: In modern operating systems, normal memory used by an application is released when the application terminates. Memory leaks may not be serious or even detectable by normal means. Eventually, in the worst case, too much of the available memory may become allocated and all or part of the system or device stops working correctly, the application fails, or the system slows down unacceptably due to thrashing. Rather, memory is allocated to a program, and that program subsequently loses the ability to access it due to program logic flaws.Ī memory leak has symptoms similar to a number of other problems (see below) and generally can only be diagnosed by a programmer with access to the program source code however, many people refer to any unwanted increase in memory usage as a memory leak, even if this is not strictly accurate.Ī memory leak can diminish the performance of the computer by reducing the amount of available memory. This term has the potential to be confusing, since memory is not physically lost from the computer. This condition is normally the result of a bug in a program that prevents it from freeing up memory that it no longer needs. In computer science, a memory leak is a particular type of unintentional memory consumption by a computer program where the program fails to release memory when no longer needed.