Android: Bitmap recycle() how does it work? -


lets have loaded image in bitmap object like

bitmap mybitmap = bitmapfactory.decodefile(myfile); 

now happen if load bitmap like

mybitmap = bitmapfactory.decodefile(myfile2); 

what happens first mybitmap garbage collected or have manually garbage collect before loading bitmap , eg. mybitmap.recycle()

also there better way load large images , display them 1 after recycling on way

the first bitmap not gc'ed when decode second one. gc later whenever decides. if want free memory asap should call recycle() before decoding second bitmap.

if want load big image should resample it. here's example strange out of memory issue while loading image bitmap object.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -