Commit a33bbf1
weak: fix weak pointer test to correctly iterate over weak pointers after GC
This change fixes a bug in the weak pointer test where the loop was
attempting to iterate over a nil slice (bt) instead of the weak
pointer slice (wt).
After setting bt to nil and running GC, the test should iterate over
the weak pointers to verify they've been cleared, not attempt to
iterate over the now-nil strong references.
Change-Id: Ic0425f59da132257770ed87d1bcea5d2c0a54e07
Reviewed-on: https://go-review.googlesource.com/c/go/+/723600
Reviewed-by: David Chase <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Sean Liao <[email protected]>1 parent a88a963 commit a33bbf1
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
0 commit comments