ANR & Memory Management

PERFORMANCE › Runtime

Keeping the main thread free and references scoped to avoid ANRs, leaks, and OOM.

ANR and memory questions probe whether you understand what blocks the main thread and what keeps objects alive longer than they should be. Interviewers expect exact ANR thresholds, the standard prevention patterns (coroutines, WorkManager, goAsync), and the classic leak sources plus how you would detect and fix them. Expect to reason about lifecycle, references, and bitmaps rather than just recite definitions.

What this covers

Study this topic

Further reading