API CreateObjectPool

Creates an ObjectPoolMixin,An is a pool of reusable widgets that may be and for reuse.
 pool = CreateObjectPool(creationFunc [, resetterFunc])
== Arguments ==
; creationFunc : - Called with one argument (pool) to construct and return a new widget.
; resetterFunc : - Called with two arguments (pool, widget) to initialize or restore a widget to its factory state.
== Methods ==
: - Furnishes a new or reused widget
: - Restores a widget to original condition for reuse
: - Restores all widgets sourced from the pool to original condition for reuse
: - Returns an iterator to cycle through widgets sourced from the pool
: - Returns an iterator to cycle through widgets released back to the pool
: - Moves to the next active widget within the pool, or returns nil
: - Moves to the next inactive widget within the pool, or returns nil
: - Indicates if the widget is presently acquired from the pool
: - Returns the number of widgets presently acquired from the pool
: - Prevents Acquire() from calling resetterFunc() on newly-created widgets.
== Example ==
-- initialize the pool
local function creationFunc()
	return CreateFrame("Frame")
end
local function resetterFunc(__, frame)
	frame:Hide()
end
local pool = CreateObjectPool(creationFunc, resetterFunc)
-- Request a frame
local frame = pool:Acquire()
frame:Show()
-- Return the frame when it is no longer required
pool:Release(frame)
-- Request a frame again
local frame = pool:Acquire() -- could be a different frame if others were acquired/released in the interim
frame:Show() -- cancels Hide() in resetterFunc
== Patch changes ==
* 
== See also ==
* - Constructs standard s.
* - Constructs standard s.
* - Constructs standard s.
* - Constructs standard s.
== External links ==
== References ==