Where will you store reference counter for interior pointer?

    type st struct { j int }
    type at { i int; s st }
    var a at
    var s st
    dealWithSt(&s)
    dealWithSt(&a.s)

So, you have two choices:
- either you have to find base address for pointer on every rc 
increment/decrement - and it is quite expensive operation (with current GC it 
is done very rare),
- or you forbid interior pointers (and store a.s in separate location) - and 
then it is not Go language.

-- 
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