Assigning a string value to another variable doesn't double the memory 
usage.

A value of type string consists of a pointer, a length, and a capacity, and 
only these are copied - so you get another copy of the pointer, pointing to 
the same data buffer.

>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/4c6168df-c5f3-44cd-8191-e6ed4672cbben%40googlegroups.com.

Reply via email to