On Thu, Apr 13, 2017 at 9:31 AM,  <sdic...@watchtower-security.com> wrote:
> https://play.golang.org/p/swRxxCbb65
>
> Surely s1 uses more than 8 bytes.

Unfortunately, your question is not well defined.  s1 itself is 8
bytes.  If you write `s3 := s1` and ask for the size of s3, it too
will be 8 bytes.  There is also string data in memory, and both s1 and
s3 will share that string data.  There isn't a clear answer to "how
much space is taken by this value and everything to which it points."

Ian

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to