William Brogden wrote:A further GC consideration is that all those little char[] can leave your memory fragmented.
If this was my problem I would use new StringBuilder( 10000 ) or maybe 20000 - more than needed probably but think of all the extra char[] that would not be created, and there would only be one char[] to be garbage collected.
For my next trick, I'll need the help of a tiny ad ...
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|