Java gc has minor problem if you are not careful while using 'collection'. You have to make sure no references are being held when you expect java gc to work.
help! could anybody know how to increase heap size when you start Java applicaton? (like java -Xmx<size>)