Quick answer: A memory leak is the gradual, unintended growth of a game's memory usage because memory that is no longer needed is never freed. The leaked memory accumulates over time, and in a long enough session it leads to performance degradation or an out-of-memory crash. Leaks are insidious because the game runs fine at first and only fails after sustained play.
A memory leak is one of the sneakiest bugs in game development because it does not cause an immediate, obvious failure. The game launches fine, plays fine for a while, and then, after an hour, a level transition, or repeated actions, it starts stuttering or crashes outright. The cause is memory quietly accumulating that should have been released. Understanding leaks explains a whole class of "it crashes after playing for a while" reports.
What a Memory Leak Is
Games constantly allocate memory, for objects, textures, audio, level data, and are supposed to release it when no longer needed. A memory leak happens when that release never occurs: something keeps a reference to data that should be gone, or allocated resources are simply never freed, so they pile up. Each leaked allocation is small, but they accumulate, and over a long session the total grows without bound.
The classic game-specific pattern is leaking on repeated operations: every time you load a level, spawn an enemy, or open a menu, a little memory leaks, and after enough repetitions it adds up to a problem. Because the leak is tied to actions rather than time alone, a player who plays intensely, many level loads, many spawns, hits it faster than a casual one.
Why Leaks Are Hard to Catch
Memory leaks are difficult precisely because they are gradual and delayed. The game works perfectly in a short test session, your typical development and QA play, so leaks routinely escape testing and only manifest for players in long sessions. The symptom (a crash or slowdown) appears far from the cause (the allocation that was never freed), and the eventual out-of-memory crash often happens in innocent code that simply asked for memory at the wrong moment, not in the leaking code itself.
This delayed, displaced nature makes leaks a frequent source of unreproducible-seeming reports: players say the game crashes "after a while" or "when I've been playing a long time," with no specific trigger. Those vague time-based reports are a signature of leaks, and they are exactly the kind that get dismissed without good reporting data.
Diagnosing Leaks From the Field
Diagnosing leaks during development uses memory profilers that track allocations and reveal what is growing. But catching the leaks that only manifest for players requires field data: crash reports that capture memory state and context at the moment of the out-of-memory failure, plus the pattern across many reports. An out-of-memory crash correlated with long session length or repeated specific actions points squarely at a leak.
Bugnet captures device context, including memory information, and groups crashes by signature, so out-of-memory crashes cluster together and arrive with the context that hints at a leak, long sessions, low available memory, a specific subsystem. Seeing that a class of crashes all involve memory exhaustion after extended play tells you to go hunting for a leak with a profiler, turning vague "crashes after a while" reports into a concrete, actionable diagnosis.
A memory leak is memory you allocate and never give back. The game runs fine, then crashes 'after a while', the delay is what makes it so sneaky.