new String(s) can help garbase collection:
String huge = ...;
String small = s.substring(0,2); //huge.value char[] is not garbage collected here
String gcFriendly = new String(small); //now huge.value char[] can be garbage collected
Thomas Jung
2009-11-26 12:04:49