Azathoth: Yeah. That's basically the "workaround" I planned on using if it turned out that it was indeed a leak.
And it turned out it was - and the method you mention Az does work. I realized a bigger issue though that eluded me before - ToCString() essentially makes a copy of the string - and in this case I'd much rather just have an actual pointer to the string itself (although I can understand why BMax doesn't do it this way).
Copying large amounts of text to send is going to get expensive.
I guess I'll have to look at the source for TString and see if I can extend it and make it return a byte ptr to the internal char array.
And it turned out it was - and the method you mention Az does work. I realized a bigger issue though that eluded me before - ToCString() essentially makes a copy of the string - and in this case I'd much rather just have an actual pointer to the string itself (although I can understand why BMax doesn't do it this way).
Copying large amounts of text to send is going to get expensive.
I guess I'll have to look at the source for TString and see if I can extend it and make it return a byte ptr to the internal char array.