Skip to content

Commit 772f024

Browse files
committed
weak: fix typo in warning about tiny allocator optimization
Fixes #70972. Change-Id: Ib04c2a3129a1da651a0b4674b372aec73966115a Reviewed-on: https://go-review.googlesource.com/c/go/+/638377 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent b9955f0 commit 772f024

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/weak/pointer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import (
5252
// nil, even after an object is no longer referenced, the runtime is allowed to
5353
// perform a space-saving optimization that batches objects together in a single
5454
// allocation slot. The weak pointer for an unreferenced object in such an
55-
// allocation may never be called if it always exists in the same batch as a
55+
// allocation may never become nil if it always exists in the same batch as a
5656
// referenced object. Typically, this batching only happens for tiny
5757
// (on the order of 16 bytes or less) and pointer-free objects.
5858
type Pointer[T any] struct {

0 commit comments

Comments
 (0)