OK, this is what I understood by pooling.
What I was wondering is that if you have a system where each new string is interned then the string table will keep growing with new strings. This does make for very fast checking of string equality. However, if you have dynamically created strings, for example data coming into the system from the outside, then the string table will grow and eventually crash the system.
While I definitely agree that strings should be immutable, immutable data is good, this means that working with strings will dynamically create new strings all the time which will exacerbate the problem. Or are they removed by the garbage collector?
We have the same problem in Erlang with atoms which are interned and dynamically creating atoms in an uncontrolled way will eventually crash the system. The solution there is to avoid dynamically creating atom but use binaries/string instead which are not interned.