Hi all,

If you have a string that will expand in size by concatenating to it, for example...

local cText := ""
cText += "Some text"
cText += "More text"
...
cText += "Even more text"

Is there any benefit in allocating the final size of the string first - For example...

local cText := Space( 2000 )
cText := ""
cText += "Some text"
...

Also, when reusing a string, does first setting it to NIL have any benefits to memory - For example...

local cText
cText := "Some text"
...
cText := nil  // Does this help memory usage at all?
cText := "New text"

TIA.

Regards,
Randy.


_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to