Skip to content
Commitwise
Menu

Memory leak

Also called: Leak

Memory that a program no longer needs but can't free, because something still refers to it.

Definition

In languages with ARC or a garbage collector, leaks aren't forgotten free() calls; they are references nobody remembered: a retain cycle under ARC, or an object still reachable from something long-lived, such as a singleton's listener list, a static cache or a running timer. Leaked screens keep their whole view tree in memory, so memory grows every time the user opens them, until the system kills the app.

In practice

A screen registers a listener with an app-wide download manager and never removes it, so every closed screen stays in memory.

Related terms

Esc

Type to search the whole site.