[android-developers] Re: Out of Memory resuming application

2010-03-23 Thread REvolver
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);

[android-developers] Re: Out of Memory resuming application

2010-03-17 Thread REvolver
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

[android-developers] Re: Out of Memory resuming application

2010-03-17 Thread Yahel
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

[android-developers] Re: Out of Memory resuming application

2010-03-16 Thread REvolver
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

[android-developers] Re: Out of Memory resuming application

2010-03-16 Thread Streets Of Boston
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

[android-developers] Re: Out of Memory resuming application

2010-03-03 Thread REvolver
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();

[android-developers] Re: Out of Memory resuming application

2010-03-03 Thread Streets Of Boston
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

[android-developers] Re: Out of Memory resuming application

2010-03-03 Thread REvolver
- 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,

[android-developers] Re: Out of Memory resuming application

2010-02-25 Thread REvolver
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,

[android-developers] Re: Out of Memory resuming application

2010-02-25 Thread Streets Of Boston
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

[android-developers] Re: Out of Memory resuming application

2010-02-23 Thread REvolver
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