Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BytesBufferPool = NewGeneric(1000, func(sz int) interface{} { return &gbp.Buffer{Pool: gbp.GlobalPool} })
Functions ¶
This section is empty.
Types ¶
type Generic ¶
type Generic struct {
// contains filtered or unexported fields
}
Generic is a pool of types that can be re-used. Items in this pool will not be garbage collected when not in use.
func NewGeneric ¶
NewGeneric returns a Generic pool with capacity for max items to be pool.
Click to show internal directories.
Click to hide internal directories.