How can I pre-allocate the memory needed in Bitmap.createBitmap(..) so
the GC doesn't run? I'm writing a realtime game so the GC should not
run, at the moment my game "stutters" every few frames (2sec). Here's
the code bugging me:

this.bmp = Bitmap.createBitmap(SPRITESHEET, Bird.mCurFrame *
BIG_W[mUseBird], 0,
                BIG_W[mUseBird], BIG_H[mUseBird], mat, true);
super.drawPlaceable(canv);

mat.preScale((float)0.6, (float)0.6);
this.bmp = Bitmap.createBitmap(SPRITESHEET, Bird.mCurFrame *
BIG_W[mUseBird], 0,
                BIG_W[mUseBird], BIG_H[mUseBird], mat, true);

-- 
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, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to