Does the garbage collector pay attention to unsafe.Pointer the way that it does
for other pointers? As far as I can tell from reading the escape analysis code
it does, but I would like to confirm.
More specifically, if I do this:
var b *byte = &make(byte, 100)
then I believe the garbage collector keeps the entire 100-byte array live. Is
that also true if I do this?
var b = unsafe.Pointer(&make(byte, 100))
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 email@example.com.
For more options, visit https://groups.google.com/d/optout.