Question: I have an android app that's been on the market for a while that i'm now overhauling. I'm using the new One x for testing, and noticed some weird things...

1. If i run the on my phone, click the home button so that the app goes to the background, i get the normal printouts i have in onPause etc. onDestroy does NOT get called, which makes you assume the process is still running.
2. However, when i go into settings/apps/running, it's not listed!! What i DO get a reoccuring printout every few seconds in the android log as long as i'm on the "running" screen:

06-20 15:04:42.435: INFO/RunningState(16694): Unknown non-service process: XXX #16558
3. If i then click on my app icon again, My lifecycle methods are called as if my app wasn't started, i.e. onCreate, onResume etc. gets called again!!

I have no idea why this is, it doesn't happen on Galaxy2 or the Note, which i just tried, i get the "expected" lifecycle calls there. 

Anybody got any thoughts? To me it looks like something is broken in the phone, but i'm just one guy and i haven't found any other reports, so i can't understand how that could be the case...

EDIT: also tested same code on the HTC Legend, no problems there...

Answer: 
There's no garantee that onDestroy will be called when you exit / finish an activity:

From <http://developer.android.com/reference/android/app/Activity.html#onDestroy()>

> 
> There are situations where the system will simply kill the activity's hosting process without calling this method (or any others) in it, so it should not be used to do things that are intended to remain around after the process goes away.
> 
> 
> 

Also see this thread here in SO

[Activity OnDestroy never called?](https://stackoverflow.com/questions/4449955/ondestroy-never-called)
In Android ICS there are some new settings for developers, among them - "Don't keep activities". It is cleared by default, but your device might be configured in another way. Try switching this checkbox on/off and see what'd happen with your activity's lifecycle.