Android & Jetpack Compose (50 Qs)•Part 3: ART Internals, Memory Leak Profiling & Production Hardening (25 - 35)
How does Android handle Process Death and State Restoration?
senior LevelPerformanceMemory ManagementHTTP & REST APIs
In Simple Words: When an app is in the background, Android OS can terminate the app process at any time to reclaim RAM for other apps:
- When the user navigates back, the system creates a brand new process and calls
onCreate(savedInstanceState: Bundle?). SavedStateHandle: In modern ViewModels, injectSavedStateHandleto save and restore critical IDs and draft form text automatically across system-initiated process termination.