mpool

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2022 License: MIT Imports: 3 Imported by: 0

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL