Memory consumption: String vs char array
807580Mar 22 2010 — edited Mar 22 2010I have a java application which in Jprofiler shows tens of thousands of strings created. We are using strings in our application and frequently re-initialize them, but not to the extent that the count moves up to ten of thousands. Strings are immutable structures. Is it that the strings shown in JProfiler are the ones that are being created but not cleaned up?
Should we use charArrays instead? They are mutable.
Vivek