Documentation ¶
Overview ¶
Package freepool manages a free pool of objects that are expensive to create.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool is a small pool of recently returned objects. Unlike sync.Pool, the pool is not subject to gargbage collection under memory pressure.
func New ¶
func New(makeNew func() interface{}, clean func(v interface{})) *Pool
New returns a new free pool.
Click to show internal directories.
Click to hide internal directories.