On this page

Class InstancePool<T>

Type Parameters

  • T
Index

Constructors

Methods

Constructors

Methods

  • Add an instance to the pool

    Parameters

    • obj: T
    • OptionalisAvailable: boolean

      make it available when true (default: false)

    Returns T

  • Make all the instances available again

    Returns void

  • Check if there are still available instances in the pool.

    Returns boolean

  • Pops one instance from the pool.

    Returns T

    when the pool of available instances is empty. Use .isEmpty() to test.

  • Remove all elements

    Returns void

Was this helpful?
SDK JS
Modules
Reference
classes
InstancePool