How To Avoid Memory Leak In Java