Show / Hide Table of Contents

Class PooledQueueHolder<T>

Struct holding a pooled System.Collections.Generic.Queue<> instance. Values of this type get returned from the New methods on PooledSystem.Collections.Generic.Queue<> and provide a strongly typed disposable wrapper around the resource.

Inheritance
System.Object
PooledQueueHolder<T>
Implements
System.IDisposable
Namespace: System.Collections.Generic
Assembly: Nuqleon.Memory.dll
Syntax
public sealed class PooledQueueHolder<T> : ValueType, IDisposable
Type Parameters
Name Description
T

Specifies the type of elements in the queue.

Constructors

PooledQueueHolder(PooledObject<PooledQueue<T>>)

Creates a new holder for the given pooled queue object.

Declaration
public PooledQueueHolder(PooledObject<PooledQueue<T>> obj)
Parameters
Type Name Description
PooledObject<PooledQueue<T>> obj

Pooled queue object to create a holder for.

Properties

Queue

Gets the System.Collections.Generic.Queue<> instance held by this instance.

Declaration
public Queue<T> Queue { get; }
Property Value
Type Description
System.Collections.Generic.Queue<T>

The System.Collections.Generic.Queue<> instance held by the holder.

Methods

Dispose()

Returns the pooled System.Collections.Generic.Queue<> instance back to the pool.

Declaration
public void Dispose()

Implements

System.IDisposable
In This Article
Back to top Generated by DocFX