mass

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 0 Imported by: 2 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

mass

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mass

type Mass[T any] struct {
	// contains filtered or unexported fields
}

Mass maintains a pool of objects to avoid excessive number of heap allocations.

func New

func New[T any](capacity uint64) *Mass[T]

New returns new pool.

func (*Mass[T]) New

func (m *Mass[T]) New() *T

New returns new object from the pool.

func (*Mass[T]) NewSlice added in v0.2.0

func (m *Mass[T]) NewSlice(n uint64) []T

NewSlice returns new slice of objects from the pool.

Jump to

Keyboard shortcuts

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