Skip to content

Interface: IPoolable

IPoolable defines the required properties of an object that is able to be pooled using an object pool.

Hierarchy

Implemented by

Table of contents

Properties

Methods

Properties

objectInPool

objectInPool: boolean

objectInPool is used to mark if the instance of the object is currently pooled.

Methods

Free

Free(): void

Free releases an object or it's constituent parts back into any available object pools.

Returns: void

Inherited from: IFreeable


Recycle

Recycle(...args: any): IPoolable

Recycle is used to reuse an existing object instance, using the arguments provided - similar to a constructor, but must be repeatable.

Parameters:

Name Type Description
...args any The arguments to use when recycling the object instance

Returns: IPoolable