]> Cypherpunks repositories - gostls13.git/commit
reflect: use runtime.AddCleanup instead of runtime.SetFinalizer
authorCarlos Amedee <carlos@golang.org>
Wed, 23 Apr 2025 16:30:52 +0000 (12:30 -0400)
committerCarlos Amedee <carlos@golang.org>
Tue, 13 May 2025 21:02:58 +0000 (14:02 -0700)
commitb4e992b6e1a3eb6985814ac074ad3057ab21c40a
tree0504fd7a882ee571481029bbe96ce65e28809c05
parentafd6b0bc663cf49e74200729da91785219d28b53
reflect: use runtime.AddCleanup instead of runtime.SetFinalizer

Replace a usage of runtime.SetFinalizer with runtime.AddCleanup in
the TestCallReturnsEmpty test. There is an additional use of
SetFinalizer in the reflect package which depends on object
resurrection and needs further refactoring to replace.

Updates #70907

Change-Id: I4c0e56c35745a225776bd611d026945efdaf96f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/667595
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/reflect/all_test.go