How does the Android or iOS lifecycle behave when an application is suddenly terminated by the operating system due to low memory?