3 // Copyright 2022 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
23 func New[X any]() *T[X] {
25 runtime.SetFinalizer(p, func(*T[X]) { close(done) })
29 type T[X any] [4]int // N.B., [4]int avoids runtime's tiny object allocator
33 var done = make(chan int)
36 for i := 0; i < 10; i++ {