Class NoPoolingListPool<T>
A pseudo-implementation of the IListPool interface which doesn't actually do any pooling; eg. its functions simply return a new list or discard the one they receive. Useful for specifying "don't pool" to a function or algorithm which takes a list pool.
Implements
IListPool<T>
Namespace: SadRogue.Primitives.Pooling
Assembly: TheSadRogue.Primitives.dll
Syntax
public sealed class NoPoolingListPool<T> : Object, IListPool<T>
Type Parameters
Name | Description |
---|---|
T | Type of items in the list. |
Constructors
NoPoolingListPool()
Declaration
public NoPoolingListPool()
Methods
Clear()
Does nothing, since this list pool implementation does not maintain a pool.
Declaration
public void Clear()
Rent()
Creates a new list and returns it.
Declaration
public List<T> Rent()
Returns
Type | Description |
---|---|
List<T> | A newly allocated list. |
Return(List<T>, Boolean)
Does nothing, simply allowing the given list to be GCed.
Declaration
public void Return(List<T> list, bool clear = true)
Parameters
Type | Name | Description |
---|---|---|
List<T> | list | List to "return". |
Boolean | clear | Ignored. |