Android Question Plenty of RAM, but error "outofmemory"

Facilauto Juan

Member
Licensed User
Longtime User
Hello there!

I have plenty of Ram in my device, but I'm getting the error "outofmemory" very often.

What is happening here? What am I doing wrong?

Thanks for your time and responses.
 

Facilauto Juan

Member
Licensed User
Longtime User
I'm using:

Temario.Bitmap=LoadBitmap(File.DirAssets,globales.PosicionImagen.Imagen)

There are around 5-7 images. The biggest is 1200 x 800.
 
Upvote 0

eps

Expert
Licensed User
Longtime User
1200x800x4 gives : 3840000kb as usage for each image. Multiply that by 7...

Why are the images so big?

Use BitmapSample and look at recycling the memory once used.

Install the Memory Manager - check memory use in the App when it's started. Then when you display one image, then a few etc... You'll see the impact on memory as you go along.
 
Upvote 0
Top