If you ensure that you have no remaining references to the "old" data, then it will definitely be garbage collected before the JVM runs out of memory and throws an "out of memory". (In a complex program it's all too easy to leave an object in a List somewhere which prevents it being GCed.)
Yu may also increase the jvm's memory allocation; the default isn't very big.
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073