Show / Hide Table of Contents

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.

Inheritance
object
NoPoolingListPool<T>
Implements
IListPool<T>
Inherited Members
object.GetType()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadRogue.Primitives.Pooling
Assembly: TheSadRogue.Primitives.dll
Syntax
public sealed class NoPoolingListPool<T> : IListPool<T>
Type Parameters
Name Description
T

Type of items in the list.

Constructors

View Source

NoPoolingListPool()

Declaration
public NoPoolingListPool()

Methods

View Source

Clear()

Does nothing, since this list pool implementation does not maintain a pool.

Declaration
public void Clear()
View Source

Rent()

Creates a new list and returns it.

Declaration
public List<T> Rent()
Returns
Type Description
List<T>

A newly allocated list.

View Source

Return(List<T>, bool)

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".

bool clear

Ignored.

Implements

IListPool<T>

Extension Methods

PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>?)
PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>?, EventHandler<ValueChangedEventArgs<TProperty>>?)
  • View Source
In this article
Back to top Generated by DocFX