Click or drag to resize
Ab4d.SharpEngine logo

ObjectPoolT Constructor

Constructor

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
Syntax
C#
public ObjectPool(
	int initialCapacity,
	Action<T>? resetObjectAction = null,
	bool resetOnReturn = false,
	bool resetOnlyReusedObjects = true
)

Parameters

initialCapacity  Int32
initial capacity of the pool
resetObjectAction  ActionT  (Optional)
optional Action that is called to reset the object (null by default)
resetOnReturn  Boolean  (Optional)
when false (by default) then resetObjectAction is called (if specified) before the object is get; when true then resetObjectAction is called (if specified) when the object is returned;
resetOnlyReusedObjects  Boolean  (Optional)
when true (by default) and when resetOnReturn is false then resetObjectAction is called (if specified) only for reused objects and not for objects that were newly created
Remarks

[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Utilities.ObjectPool`1.#ctor(System.Int32,System.Action{`0},System.Boolean,System.Boolean)"]

See Also