]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: relax SetFinalizer documentation to allow &local
authorElias Naur <elias.naur@gmail.com>
Thu, 22 Sep 2016 07:37:28 +0000 (09:37 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 27 Sep 2016 16:38:47 +0000 (16:38 +0000)
commit60482d8a8b11a3dfdf9b582b9f666694d84bb9c4
treea08a344fcfe3343cc166fc57c82e1ae6b0b03656
parent413f1ef4de98f2e98853c3753f785871bfc32e5d
runtime: relax SetFinalizer documentation to allow &local

The SetFinalizer documentation states that

"The argument obj must be a pointer to an object allocated by calling
new or by taking the address of a composite literal."

which precludes pointers to local variables. According to a comment
on #6591, this case is expected to work. This CL updates the documentation
for SetFinalizer accordingly.

Fixes #6591

Change-Id: Id861b3436bc1c9521361ea2d51c1ce74a121c1af
Reviewed-on: https://go-review.googlesource.com/29592
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/mfinal.go