
Explain how you handle memory management in a mobile app. Cover common failure modes such as leaks, oversized caches, retained UI objects, and unbounded background work, and describe how you would prevent and debug them.
Understanding of object lifetime and retentionUse of arrays, hash tables, and queues in memory-sensitive codeLifecycle-aware cleanupDebugging with profiling and heap inspectionExplains leaks in terms of references and reachabilityDiscusses bounded caches and queue growthMentions lazy loading and incremental processingIncludes a concrete debugging workflow