A generic container that facilitates pooling and recycling of objects. WARNING: Pooled objects must have parameter-less constructors: function new()

Constructor

new(constructor:PoolFactory<T>)

Creates a pool of the specified type

Parameters:

constructor

A function that takes no args and creates an instance, example: FlxRect.new.bind(0, 0, 0, 0)

Variables

read onlylength:Int

Methods

get():T

preAllocate(numObjects:Int):Void

put(obj:T):Void