Class PooledListHolder<T>
Struct holding a pooled System.Collections.Generic.List<> instance. Values of this type get returned from the New methods on PooledSystem.Collections.Generic.List<> and provide a strongly typed disposable wrapper around the resource.
Inheritance
System.Object
PooledListHolder<T>
Implements
System.IDisposable
Namespace: System.Collections.Generic
Assembly: Nuqleon.Memory.dll
Syntax
public sealed class PooledListHolder<T> : ValueType, IDisposable
Type Parameters
Name | Description |
---|---|
T | The type of elements in the list. |
Constructors
PooledListHolder(PooledObject<PooledList<T>>)
Creates a new holder for the given pooled list object.
Declaration
public PooledListHolder(PooledObject<PooledList<T>> obj)
Parameters
Type | Name | Description |
---|---|---|
PooledObject<PooledList<T>> | obj | Pooled list object to create a holder for. |
Properties
List
Gets the System.Collections.Generic.List<> instance held by this instance.
Declaration
public List<T> List { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T> | The System.Collections.Generic.List<> instance held by the holder. |
Methods
Dispose()
Returns the pooled System.Collections.Generic.List<> instance back to the pool.
Declaration
public void Dispose()
Implements
System.IDisposable