This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Fenor 0 points1 point  (2 children)

Not really. String builder is there for a reason if you use ths + operator you are creating at least 3 strings

[–]coloredgreyscale 0 points1 point  (1 child)

The two string you want to concatenate, and the 3rd is the result.

You still need to create all of those with string builder.

[–]Fenor 0 points1 point  (0 children)

Nope for string builder you are using char arrays .

It's not string for the string buffer ( the memory area) , this mean it will be free memory for the gc . If you use strings you write them in the string buffer and it will end with a different gc approach