Thursday, January 24, 2013

Memory management tips for JAVA

1) Minimize scope of variables
2) Initialize When You Actually Need (Variable Or Object)
3) Allocate Only Required Memory
4) Do not Declare in Loops
5) Memory Leaks Possibilities Through Soft References in Collections
6) Mutating Operations on String
7) Clean up Heavy Objects
8) Simply Use finally Block
9) ‘finalize’ Method Call Has Advantages and Disadvantages
10) Design and Architecture requiring more Memory       

No comments:

Post a Comment