Class Pool

For pooling objects that can be reused.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

objects: any[]

The objects array.

type: any

The type of the objects.

Methods

  • Construct an object. Should be implemented in each subclass.

    Returns void

  • Get an object

    Returns any

  • Release an object after use

    Parameters

    • Rest ...args: any[]

    Returns Pool

  • Parameters

    • size: number

    Returns Pool

    Self, for chaining