Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LazySlice ¶
type LazySlice struct {
// contains filtered or unexported fields
}
LazySlice holds 0 or 1 slices from a particular Pool.
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool wraps a sync.Pool of *[]byte. To encourage correct usage, all public methods are on slicepool.LazySlice.
All copies of a Pool refer to the same underlying pool.
"*[]byte" is used to avoid a heap allocation when passing a []byte to sync.Pool.Put, which leaks its argument to the heap.
Click to show internal directories.
Click to hide internal directories.