Commit fd45e267 authored by Matthew Dempsky's avatar Matthew Dempsky
Browse files

runtime: warn that KeepAlive is not an unsafe.Pointer workaround

Even experienced users occasionally mistake that runtime.KeepAlive can
be used as a workaround for following the unsafe.Pointer safety rules,
but it cannot. Add an explicit warning to this effect to dissuade
users from trying to use it as such.

Fixes #47562.

Change-Id: I842e33a3e1c080933c6b1bd1b6318448adbf495c
Reviewed-on: https://go-review.googlesource.com/c/go/+/340269


Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 6e738868
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment