Having done Android for so long, summarize the memory-optimized points that you might normally use:
1, load Bitmap, if the picture is larger than the screen resolution, to reduce, if less than the original size load, while note 2.3 and the following system bitmap is allocated in native memory and 3.0 is in the heap of the virtual machine
2. Release and UI related resources such as bitmap, arrays, etc. at Ontrimmemory () level Trim_memory_hidden
3, the background task can use Intentservice to complete the use of Intentservice, because its own thread done after the service auto stop, will not affect the number of system process cached
4, the ability to use the system share memory using the resources such as the cursor buffer zygote process loaded
5, use optimized data containers such as Sparsearray, Sparsebooleanarray, and Longsparsearray.
6. Be aware of memory overhead such as enumeration type the RAM usage is twice times the static field on Android.
Android Memory Optimization Summary