Skip to content

package pooling

import "kaiju/pooling"

Constants

ElementsInPool

256

Types

Pool

struct

type Pool[T any] struct {
    // Has unexported fields.
}

PoolGroup

struct

type PoolGroup[T any] struct {
    // Has unexported fields.
}

PoolGroup.Add

func (p *PoolGroup[T]) Add() (elm *T, poolId PoolGroupId, elmId PoolIndex)

PoolGroup.Clear

func (p *PoolGroup[T]) Clear()

PoolGroup.Count

func (p *PoolGroup[T]) Count() int

PoolGroup.Each

func (p *PoolGroup[T]) Each(each func(elm *T))

PoolGroup.Remove

func (p *PoolGroup[T]) Remove(poolIndex PoolGroupId, elementId PoolIndex)

PoolGroup.Reserve

func (p *PoolGroup[T]) Reserve(additionalElements int)

PoolGroupId

int

type PoolGroupId = int

PoolIndex

uint8

type PoolIndex = uint8