Avoiding allocation in broadcast server

Stanislav Blinov stanislav.blinov at gmail.com
Fri Feb 7 15:57:02 PST 2014


To me it seems that you have to have at least one allocation per 
string received.

To submit your string to another thread verbatim, you have to be 
able to guarantee that the buffer is immutable, which you cannot 
do because you can receive a new string at any given time (which 
would overwrite the existing buffer).

So allocating on receive seems like the most logical option.


More information about the Digitalmars-d-learn mailing list