Memory Leak
Memory Leak
A phenomenon where memory that's no longer needed isn't released and keeps piling up, slowing the computer down.
In Simple Terms
A memory leak refers to a phenomenon where workspace that's no longer being used stays occupied because it's never cleaned up. As you keep using an app, more and more memory gets consumed, and eventually things get choppy or the app crashes outright. Closing the app often resets things, but fixing the root cause requires changes to the program itself.
Behind the Name
Memory Leak combines the English words "Memory" and "Leak." Just like water leaking out little by little, it describes memory that should be freed up gradually shrinking away instead. It's a well-known type of programming bug.
Take a Closer Look!
A memory leak is a bug where a computer's memory keeps failing to get released.
When a program runs, it's supposed to claim a chunk of memory as a kind of workspace, then tidy up and return it to the pool once it's done. But if that cleanup step gets forgotten, the memory stays occupied even though it looks like nothing's using it.
When a memory leak happens, the amount of free memory keeps shrinking.
Once there's no free space left, the computer can't secure room to run other processes, and everything slows to a crawl. Preventing this comes down to making sure the program always includes proper cleanup code once it's finished using memory.
Put simply, a memory leak is like clutter piling up on a desk that never gets put away.
Many programming languages have mechanisms that clean up automatically, but preventing leaks completely is still difficult. It's something to watch out for especially in servers or smartphone apps that keep running for long stretches.