ScalingPool<T>

Warning

This documentation is for an implementation of a service. This class is not meant to be used directly; instead use the Protogame.IPool service via dependency injection to access this functionality.

Information documented here may not be up to date.

class ScalingPool<T> : System.Object, IPool<T>, IRawPool

An implementation of an T:Protogame.IPool`1 which is capable of scaling the capacity as more objects are needed. Unlike standard allocation and collection, this implementation allocates objects in an incremental block amount.

Type Parameters:
 
  • T
readonly int Free
readonly string Name
readonly int NextAvailable
readonly int NextReturn
readonly int Total
public Protogame.T Get()
public void Release(Protogame.T instance)
Parameters:
  • instance (Protogame.T) –
public void ReleaseAll()