Table of Contents

Class ObjectPool<T>

Namespace
GameCanvas
Assembly
GameCanvas.dll
public sealed class ObjectPool<T> where T : class, new()

Type Parameters

T
Inheritance
ObjectPool<T>
Inherited Members

Constructors

ObjectPool(int, int)

public ObjectPool(int capacity = 8, int initialSize = 0)

Parameters

capacity int
initialSize int

Methods

Get()

public T? Get()

Returns

T

GetOrCreate()

public T GetOrCreate()

Returns

T

ReleaseAll()

public void ReleaseAll()