End

This is the output, in which you can notice the doubling of the capacity whenever extra memory is needed:

Len/Cap: Len/Cap: Len/Cap: Len/Cap: Len/Cap: Len/Cap: Len/Cap: Len/Cap: Len/Cap: Len/Cap:

492:512

984:1024

1476:2048

1968:2048

2460:4096

2952:4096

3444:4096

3936:4096

4428:8192

4920:8192

Even if speed increments by using TStringBuilder versus plain string concatenation are not always significant, the new class tends to make code more flexible and easier to write, so I recommend switching your existing code to use it whenever possible107.

Was this article helpful?

0 0
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment