Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryPool ¶
type MemoryPool[T any] struct { // contains filtered or unexported fields }
func New ¶
func New[T any]() *MemoryPool[T]
func (*MemoryPool[T]) Free ¶
func (mp *MemoryPool[T]) Free(num int)
func (*MemoryPool[T]) FreeAll ¶
func (mp *MemoryPool[T]) FreeAll()
func (*MemoryPool[T]) FreeSlice ¶
func (mp *MemoryPool[T]) FreeSlice(num int, size int)
func (*MemoryPool[T]) Get ¶
func (mp *MemoryPool[T]) Get() *T
func (*MemoryPool[T]) GetSlice ¶
func (mp *MemoryPool[T]) GetSlice(size int) []T
func (*MemoryPool[T]) Put ¶
func (mp *MemoryPool[T]) Put(v *T)
func (*MemoryPool[T]) PutSlice ¶
func (mp *MemoryPool[T]) PutSlice(v *[]T)
Click to show internal directories.
Click to hide internal directories.