Hello, I've noticed a very strange behavior. I'm using Android 2.3.6 (Nexus One). I've created an activity(part of my process) that has a surface view and an overlay transparent image. The background shows a preview of the camera and the overlay ImageView is loaded with an image at onCreate.
External memory consumption stays low (~ 2M), the moment I run the activity it jumps to around 14MB. I do the following steps: 1. Activity is launched in standard mode (http://developer.android.com/ guide/topics/manifest/activity-element.html#lmode) 2. I press the home button. 3. I see the desktop. 4. I can rerun the activity as many times as I want no crash. Second Phase: 1. Activity is launched in standard mode (http://developer.android.com/ guide/topics/manifest/activity-element.html#lmode) 2. Press back button. Activity goes to OnDestroy (process still alive) 3. Start activity again immediately afterwards. 4. Activity crashes...out of memory. 5. I can see that the memory consumption after OnDestory doesn't go down Third Phase: 1. Activity is launched in standard mode (http://developer.android.com/ guide/topics/manifest/activity-element.html#lmode) 2. Press back button. Activity goes to OnDestroy (process still alive) 3. Wait ~7 seconds. 4. Memory consumption goes back to ~2M 5. Start activity again runs successfully. Run steps 1..5 over and over successfully. Forth Phase: 1. Activity is launched in standard mode (http://developer.android.com/ guide/topics/manifest/activity-element.html#lmode) 2. Press back button. Activity goes to OnDestroy (process still alive) 3. Click on DDMS click on GC button. 4. Memory consumption goes back to ~2M 5. Start activity again runs successfully. Run steps 1..5 over and over successfully. Questions: 1. Why does it take so much time to release the external memory ? 2. Is GC my only help here ? Thanks. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

