Tips
- Do not allocate excessive memory. Allocate memory only just as much needed. This is specially applicable to Java arrays.
- Don’t hold on to references. Once the object is used and no longer needed, assign
null
reference to it. - Find and resolve memory leaks
- Do system profiling on each release to verify memory bumps
- Do not rely on System.gc() to run garbage collection