Hello World on Android consuming lots of RAM

2

I'm making an application and I noticed that it's consuming a lot of RAM, about 70MB. I have a button that inflates an extra layout with random data and that keeps changing dynamically that because of that it increases the memory used in Android.

Looking around I noticed Andorid Hello World already consumes 13MB and it only has a activity and text.

My question is how can I improve memory usage in the application code? How do I clear the cache or kill an activity? (In my app killing an activity does not solve much)

    
asked by anonymous 11.02.2014 / 16:21

1 answer

3

There is a Thread in the Android Brazil Dev group (Google Groups) that talks about memory management and memory reservation, it's worth giving a read.

link

Edit:

This thread in the Google Group brings a very important information where there is a minimum memory allocation for each type of device see.

Note:IfindsomestrangeapplicationsthatusedxLargewithScreemDensityofxxHdpitouse256MB,formeit'salotofmemory.

source: link

Another very important information with the control of images where it is guiding to decrease the images using the process of thumbnail.

Follow the very interesting links about memory management in Android.

Video Google IO 2011

Weak references

Material how Garbage Collector works

    
11.02.2014 / 17:18