Thanks.

The biggest problem is the single image that I'm trying to load, it's
a 250K gif image that gets inflated to almost 11MB.

How would you suggest lowering this number?

BTW why images get inflated so much when loaded into the memory ?

On Oct 31, 8:59 pm, Mark Murphy <[email protected]> wrote:
> On Mon, Oct 31, 2011 at 2:53 PM, Efi Merdler-Kravitz
>
> <[email protected]> wrote:
> > 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
>
> Garbage collection is neither immediate nor complete, as evidenced by
> "Third Phase".
>
> > Questions:
> > 1. Why does it take so much time to release the external memory ?
>
> That's the way garbage collection works.
>
> > 2. Is GC my only help here ?
>
> It may not be a help. It is unclear where you might call System.gc()
> that would occur after onDestroy() has completed.
>
> I'd focus on trying not to use 14MB of heap space.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 4.0 Available!

-- 
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

Reply via email to