Investigating Mobile Memory Problems
Question
Memory problems - how to investigate?
Short interview answer
Reproduce the issue in a release-like build, measure allocations and retained objects with platform profiling tools, then trace why an object remains reachable. Fix the ownership or lifecycle issue and verify memory returns to a stable baseline through repeated use.
Detailed answer
Start with a repeatable scenario such as opening and closing a media-heavy screen fifty times. Compare memory before, during, and after the loop; a temporary rise is not by itself a leak, but continually retained screen, image, subscription, or cache objects are evidence to investigate. Check event subscriptions, navigation stacks, long-lived services, static references, and native-resource disposal. Use a profiler’s allocation and reference information to identify the retaining path, then test the fix on real devices because memory pressure and process termination are platform behavior, not just managed-runtime behavior.