If we are talking about a Bitmap, you can call recycle() yourself.
But I have a feeling that this is caused by an image being too large -
as one image shouldn't make a difference (I assume you have a background).
Is it appropriately scaled to fit the screen, or are you loading, say, a
2048 by 1024 bitmap and scaling it during drawing?
-- Kostya
11.12.2010 15:13, Kenny Chang пишет:
The first activity is the welcome activity, which lets users choose a
choice to start a new activity.
If the second activity go straight to onDestroy, the heap resources
that the second activity holds
can be so much that causes OUT_OF_MEMORY ERROR when user choose a
choice to start a new activity in the
first activity.So...
On Dec 11, 6:49 pm, Indicator Veritatis<[email protected]> wrote:
So what? Why do you need it to go straight to onDestroy? Or rather, I
should ask, why do you THINK you need it to go
straight to onDestroy()? For I doubt your need is genuine.
On Dec 10, 10:12 pm, Kenny Chang<[email protected]> wrote:
I try to call finish() in an activity in order to destroy the activity
to free resources.
But the Logcat shows it doesn't work immediately to call "onDestroy"
instead of calling "onPause" and after a few seconds "onDestroy" is
called.
What I want is destory and finish the activity just after I call
finish(). But the problem is that when I press "Back" button or call
finish(), it doesn't free bitmap resources and destroy the activity
immediately.
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
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