sync.Pool.New (field)
55 uses
sync (current package)
pool.go#L63: New func() any
pool.go#L154: if x == nil && p.New != nil {
pool.go#L155: x = p.New()
crypto/internal/fips140/drbg
rand.go#L17: New: func() any {
crypto/tls
conn.go#L967: New: func() any {
encoding/json
scanner.go#L88: New: func() any {
fmt
print.go#L147: New: func() any { return new(pp) },
scan.go#L379: New: func() any { return new(ss) },
go.pact.im/x/zapjournal
pool.go#L15: New: func() any {
go.uber.org/multierr
error.go#L178: New: func() interface{} {
go.uber.org/zap/internal/pool
pool.go#L43: New: func() any {
go/printer
printer.go#L1324: New: func() any {
golang.org/x/net/http2
databuffer.go#L24: {New: func() interface{} { return new([1 << 10]byte) }},
databuffer.go#L25: {New: func() interface{} { return new([2 << 10]byte) }},
databuffer.go#L26: {New: func() interface{} { return new([4 << 10]byte) }},
databuffer.go#L27: {New: func() interface{} { return new([8 << 10]byte) }},
databuffer.go#L28: {New: func() interface{} { return new([16 << 10]byte) }},
frame.go#L222: New: func() interface{} {
gotrack.go#L82: New: func() interface{} {
http2.go#L278: New: func() interface{} {
http2.go#L374: var sorterPool = sync.Pool{New: func() interface{} { return new(sorter) }}
server.go#L76: New: func() interface{} {
server.go#L1128: New: func() interface{} { return make(chan error, 1) },
server.go#L1147: New: func() interface{} { return new(writeData) },
golang.org/x/net/http2/hpack
huffman.go#L15: New: func() interface{} { return new(bytes.Buffer) },
google.golang.org/grpc
rpc_util.go#L78: New: func() any {
google.golang.org/grpc/internal/transport
controlbuf.go#L45: New: func() any {
http_util.go#L433: New: func() any {
google.golang.org/grpc/mem
buffer_pool.go#L141: New: func() any {
buffers.go#L64: bufferObjectPool = sync.Pool{New: func() any { return new(buffer) }}
buffers.go#L65: refObjectPool = sync.Pool{New: func() any { return new(atomic.Int32) }}
google.golang.org/protobuf/internal/filedesc
desc_init.go#L539: New: func() any { return new(strs.Builder) },
google.golang.org/protobuf/internal/order
range.go#L21: New: func() any { return new([]messageField) },
range.go#L72: New: func() any { return new([]mapEntry) },
internal/poll
splice_linux.go#L191: var splicePipePool = sync.Pool{New: newPoolPipe}
io
io.go#L656: New: func() any {
log
log.go#L166: var bufferPool = sync.Pool{New: func() any { return new([]byte) }}
net/http
h2_bundle.go#L1212: {New: func() interface{} { return new([1 << 10]byte) }},
h2_bundle.go#L1213: {New: func() interface{} { return new([2 << 10]byte) }},
h2_bundle.go#L1214: {New: func() interface{} { return new([4 << 10]byte) }},
h2_bundle.go#L1215: {New: func() interface{} { return new([8 << 10]byte) }},
h2_bundle.go#L1216: {New: func() interface{} { return new([16 << 10]byte) }},
h2_bundle.go#L1790: New: func() interface{} {
h2_bundle.go#L3315: New: func() interface{} {
h2_bundle.go#L3758: New: func() interface{} {
h2_bundle.go#L3862: var http2sorterPool = sync.Pool{New: func() interface{} { return new(http2sorter) }}
h2_bundle.go#L4123: New: func() interface{} {
h2_bundle.go#L5211: New: func() interface{} { return make(chan error, 1) },
h2_bundle.go#L5215: New: func() interface{} { return new(http2writeData) },
header.go#L161: New: func() any { return new(headerSorter) },
server.go#L820: var copyBufPool = sync.Pool{New: func() any { return new([copyBufPoolSize]byte) }}
os
dir_unix.go#L33: New: func() any {
reflect
type.go#L2784: framePool = &sync.Pool{New: func() any {
syscall
netlink_linux.go#L53: var pageBufPool = &sync.Pool{New: func() any {
vendor/golang.org/x/net/http2/hpack
huffman.go#L15: New: func() interface{} { return new(bytes.Buffer) },