Activity生命周期
1 12-19 21:51:01.783: D/ActivityThread(2142): setTargetHeapIdealFree:8388608 2 12-19 21:51:01.783: D/ActivityThread(2142): setTargetHeapConcurrentStart:2097152 3 12-19 21:51:02.054: E/AdFireWallNative(2142): AdFrieWall JNI_OnLoad 4 12-19 21:51:02.054: E/AdFireWallNative(2142): AdFireWall JNI_OnLoad done. 5 12-19 21:51:02.074: D/onCreate(2142): onCreate Method is executed. 6 12-19 21:51:02.074: D/onStart(2142): onStart Method is executed. 7 12-19 21:51:02.074: I/LBE-Sec(2142): ActivityManager.GetContentProvider->settings 8 12-19 21:51:02.084: D/onResume(2142): onResume Method is executed. 9 12-19 21:51:04.276: D/onPause(2142): onPause Method is executed. 10 12-19 21:51:04.686: D/onStop(2142): onStop Method is executed. 11 12-19 21:51:16.469: D/onRestart(2142): onRestart Method is executed. 12 12-19 21:51:16.469: D/onStart(2142): onStart Method is executed. 13 12-19 21:51:16.469: D/onResume(2142): onResume Method is executed. 14 12-19 21:51:44.799: D/onPause(2142): onPause Method is executed. 15 12-19 21:51:45.350: D/onStop(2142): onStop Method is executed. 16 12-19 21:51:49.364: D/onRestart(2142): onRestart Method is executed. 17 12-19 21:51:49.364: D/onStart(2142): onStart Method is executed. 18 12-19 21:51:49.374: D/onResume(2142): onResume Method is executed. 19 12-19 21:51:59.955: D/onPause(2142): onPause Method is executed. 20 12-19 21:52:00.356: D/onStop(2142): onStop Method is executed. 21 12-19 21:52:24.101: D/onRestart(2142): onRestart Method is executed. 22 12-19 21:52:24.101: D/onStart(2142): onStart Method is executed. 23 12-19 21:52:24.101: D/onResume(2142): onResume Method is executed. 24 12-19 21:52:36.635: D/onPause(2142): onPause Method is executed. 25 12-19 21:52:37.205: D/onStop(2142): onStop Method is executed. 26 12-19 21:52:37.205: D/onDestroy(2142): onDestroy Method is executed. 27 12-19 21:52:40.268: D/onCreate(2142): onCreate Method is executed. 28 12-19 21:52:40.278: D/onStart(2142): onStart Method is executed. 29 12-19 21:52:40.278: D/onResume(2142): onResume Method is executed. 30 12-19 21:54:40.527: D/onPause(2142): onPause Method is executed.
另一种情况就是不能把退出所有Activity等同于进程的退出,所以在用户点击图标启动应用的时候,以前存放于静态变量中的值,有可能还存在,因此要视具体情况给予清空操作。