Yes, I've already read the article...
This is th code for the onPause and onResume methods.
public void onResume(){
super.onResume();
if(!mWakeLock.isHeld()){
pm =
(PowerManager)getSystemService(Context.POWER_SERVICE);
but the problem seems to be in the onpause- onresume cycle, because
if I try to switch between the two views it works...
as soon as i pause and reume the application, my external heap grow
(of course after switching to another view).
On Mar 16, 3:58 pm, Streets Of Boston flyingdutc...@gmail.com
Hi Luca,
As Anton told you, withouth the code in the onpause and onresume, hard
to tell if you're doing something wrong.
One option might be to save the state of your app in onpause and then
restore that state in your onresume.
This way you could clean up all the bitmaps in the onpause and
No idea?
On Mar 4, 8:59 am, REvolver luca.lupol...@gmail.com wrote:
- Are these fields static or are they instance-fields?
Yes, they're static.
- When do you call loadAlphaBlinkingBitmaps or loadProxyBitmaps
All the load Bitmaps methods are called in the gamescreen
Sorry, i didn't see your earlier reply.
It seems you're cleaning up your bitmaps...
However, it's hard to tell not having the code.
I suggest debugging the code carefully, closely monitoring the
construction and release (bitmap.recycle) of your bitmaps and see if a
lack of releasing bitmaps is
Ok,
Actually I load several Bitmaps using Bitmap.createBitmap(..) or
BitmapFactory.decodeResource(...).
In this snippet I use the first way
static public void loadProxyBitmpas(){
//load the sprites
BitmapFactory.Options op= new BitmapFactory.Options();
The fields mProxy and mBitmap are a bit suspect here. You cache
bitmaps in them.
- Are these fields static or are they instance-fields?
- When do you call loadAlphaBlinkingBitmaps or loadProxyBitmaps
(during onCreate, during onPause, ...)
- When do you clear out the mBitmap and mProxy caches? (in
- Are these fields static or are they instance-fields?
Yes, they're static.
- When do you call loadAlphaBlinkingBitmaps or loadProxyBitmaps
All the load Bitmaps methods are called in the gamescreen
constructor.
- When do you clear out the mBitmap and mProxy caches? (in onPause,
None?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options,
It could be anything. You have to post some code-samples that you
think code be suspicious.
Check your (static) caches, if you have them.
On Feb 25, 6:49 am, REvolver luca.lupol...@gmail.com wrote:
None?
--
You received this message because you are subscribed to the Google
Groups Android
I've also tracked the memory (the external heap) with DDMS and it's
stable if I don't pause my application (about 7 mb for the gallery
view and about 10 mb for the gamescreen view), but after pausing and
resuming the application my gamescreen memory is 13 mb... Any ideas?
--
You received this
11 matches
Mail list logo