From b33ba0b3939dcf83e6ef3e20e6ac7aab90f06df7 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 26 Dec 2024 17:26:33 -0500 Subject: _content/doc/go1.24: group weak with non-crypto sections The section on the new weak package makes more sense grouped with the finalizers section. Change-Id: Ic293e9b3bdbe3c0e78407246cdc4ed2792f37ace Reviewed-on: https://go-review.googlesource.com/c/website/+/638561 LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov Reviewed-by: Ian Lance Taylor --- _content/doc/go1.24.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/_content/doc/go1.24.md b/_content/doc/go1.24.md index 824c5d10..8d191324 100644 --- a/_content/doc/go1.24.md +++ b/_content/doc/go1.24.md @@ -230,6 +230,19 @@ cleanups do not generally cause leaks when objects form a cycle, and cleanups do not delay the freeing of an object or objects it points to. New code should prefer `AddCleanup` over `SetFinalizer`. +### New weak package {#weak} + +The new [`weak`](/pkg/weak/) package provides weak pointers. + +Weak pointers are a low-level primitive provided to enable the +creation of memory-efficient structures, such as weak maps for +associating values, canonicalization maps for anything not +covered by package [`unique`](/pkg/unique/), and various kinds +of caches. +For supporting these use-cases, this release also provides +[`runtime.AddCleanup`](/pkg/runtime/#AddCleanup) and +[`maphash.Comparable`](/pkg/maphash/#Comparable). + ### New crypto/mlkem package {#crypto-mlkem} @@ -258,19 +271,6 @@ as defined in [FIPS 202](http://doi.org/10.6028/NIST.FIPS.202). All three packages are based on pre-existing `golang.org/x/crypto/...` packages. -### New weak package {#weak} - -The new [`weak`](/pkg/weak/) package provides weak pointers. - -Weak pointers are a low-level primitive provided to enable the -creation of memory-efficient structures, such as weak maps for -associating values, canonicalization maps for anything not -covered by package [`unique`](/pkg/unique/), and various kinds -of caches. -For supporting these use-cases, this release also provides -[`runtime.AddCleanup`](/pkg/runtime/#AddCleanup) and -[`maphash.Comparable`](/pkg/maphash/#Comparable). - ### New experimental testing/synctest package {#testing-synctest} The new experimental [`testing/synctest`](/pkg/testing/synctest/) package -- cgit v1.3