On Mon, Aug 20, 2018 at 3:48 PM 'Florian Uekermann' via golang-nuts < golang-nuts@googlegroups.com> wrote:
>> The garbage collector does not care about the values of items of a []T when T is not a pointer type nor a type containing transitively any pointers. > > Just to make sure I understand you correctly. Are you saying I could hold an unsafe.Pointer to an array of uint64 and the GC will still not care about what is inside that array? > Because that is my concern here. unsafe.Pointer does not point to a particular type, that's why it cannot be dereferenced. From the GC POV, the only interesting thing about an unsafe.Pointer is if its value falls anywhere into a GC managed memory block for liveness analysis, AFAIK. Additionally, there are some runtime checks for obviously invalid unsafe.Pointer values, IIRC. -- -j -- 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.