Adrian Crum wrote: > I'll check into that - thanks! > > In this case, should we take the shotgun approach and just use intern on > the custom XML properties files? Do you know of any disadvantage to > using intern too much?
The biggest issue one might face is that the memory might not be freed, until *all* references to a single shared common word are freed. But, in that case, it can actually help with memory usage. At parse time, there is the additional overhead of looking up the string in the internal hashmap; but once loaded, things run faster; Comparing interned strings is faster, as a quick == can be used.
