QamoosTech
Programming FundamentalsRuntime and memoryIntermediate

Memory Leak

PronunciationMEM-uh-ree LEEK

Definition

A memory leak is a bug where a program keeps memory it no longer needs, so its memory use grows over time until it slows down or crashes.

Where you hear it

In production monitoring (memory climbing for hours), OOM kills in containers and performance investigations.

Examples

  • Memory climbs 50 MB an hour, so we have a leak.
  • An unbounded in-memory cache is a classic leak.
  • The listener was never removed, so every page visit kept one more object in memory.

Common mistake

Thinking a garbage-collected language can't leak. Objects still referenced (in a global list or cache) are never collected.

Don't confuse with

High memory use that is stable. A leak is memory that keeps growing without bound.

Say it at work

  • In a meeting or chatTake a heap snapshot to find what's growing.
  • In an email or ticketRestarting hides the leak; we still need to fix it.