Hi!

Im making a game for android, Im about halfway trough (its my first real 
game that Im planning to release) and I just started using DDMS, and 
realised that my heap-size was at around 30 000, with a leak on around 3000 
every time I changed level. So I created a method that loaded my bitmaps 
with only 3 colors, and this reduced my heap-size down to 20 000, and I 
suspect that the memory leak is because the menu I have in between levels 
(with score etc) is a new activity started in realtime, Im gonna change 
this to a dialog-box so I never have to leave the main-activity in 
realtime. 

But obviously 20 000 heap size is still to much! I need to get down to 16 
000, and like I said, I'm only halfway done. I Only have 5-6 different 
bitmaps onScreen at a time, sure there is around 5-6 enemies on screen that 
are using the same bitmap, aswell as several bullets using the same bitmap. 

So after all that, my question is, is there any common mistakes that 
beginners do that increases heap-size that I might have done? I've been 
reading about it for weeks and watched a couple of google-lectures on 
youtube. But nothing that really helps. Ive been trying to isolate the 
problem by removing 1 class at a time, then starting my game, but dosnt 
seem to go down. Going crazy! Been working for 6-7 months and now it might 
end up in the trash =/. 

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