Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BytesAlloctor ¶
type BytesAlloctor struct {
// contains filtered or unexported fields
}
var GAlloctor *BytesAlloctor
func (*BytesAlloctor) Get ¶
func (ba *BytesAlloctor) Get(size int) []byte
func (*BytesAlloctor) Put ¶
func (ba *BytesAlloctor) Put(buf []byte)
type ObjectPool ¶
type ObjectPool[T any] struct { // contains filtered or unexported fields }
func NewObjectPool ¶
func NewObjectPool[T any](newFn func() *T) *ObjectPool[T]
func (*ObjectPool[T]) Get ¶
func (p *ObjectPool[T]) Get() *T
func (*ObjectPool[T]) Put ¶
func (p *ObjectPool[T]) Put(v *T)
Click to show internal directories.
Click to hide internal directories.