When a program gets executed, it uses memory. In some cases, a poorly-written program may incorrectly manage the memory that has been given to it. As a consequence, the memory that was actually supposed to be reused after the program has finished its job cannot be accessed again. This is known as a memory leak.