I'm happy to keep a static or member reference to the Bitmap object for future usage - but I'm worried if that will reduce the amount of memory available to my app?
Alex On Apr 14, 2:51 pm, Streets Of Boston <flyingdutc...@gmail.com> wrote: > If this bitmap is used for displaying only one item (image), why do > you create a new bitmap over and over again? > > once: > mBitmap = Bitmap.createBitmap(320,480,Config.RGB_565); > ... > ... > many times: > Canvas canvas = new Canvas(mBitmap); > // clear canvas > // draw into canvas > ... > .. > > On Apr 14, 9:22 am, "admin.androidsl...@googlemail.com" > > <admin.androidsl...@googlemail.com> wrote: > > Running these many times in my app loop : > > > Bitmap bitmap = Bitmap.createBitmap(320, 480, Config.RGB_565); > > Canvas canvas = new Canvas(bitmap); > > > I'm thinking of caching either / both of these objects, but don't want > > to get out of memory errors either! > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---