Skip to content

Memory leak

Memory that is no longer needed stays allocated while the program runs.

Software architecture

What is a memory leak?

A memory leak occurs when memory no longer needed remains unnecessarily retained. Memory demand may grow during extended use. Automatic garbage collection does not fundamentally prevent this: a still-reachable object may be obsolete for the application yet remain retained. Briefly high memory use alone does not prove a leak.

In a fictional portal, closed document views remain in a globally reachable list. Their data stays reachable despite no longer being needed. The team investigates retaining references and the views’ lifecycle. After a correction, repeated opening and closing is compared under suitable conditions. What matters is whether unnecessary retention disappears; a single instantaneous value or a restart does not explain the cause.

Sources