Show / Hide Table of Contents

Class PooledStackHolder<T>

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

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

Specifies the type of elements in the stack.

Constructors

PooledStackHolder(PooledObject<PooledStack<T>>)

Creates a new holder for the given pooled stack object.

Declaration
public PooledStackHolder(PooledObject<PooledStack<T>> obj)
Parameters
Type Name Description
PooledObject<PooledStack<T>> obj

Pooled stack object to create a holder for.

Properties

Stack

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

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

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

Methods

Dispose()

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

Declaration
public void Dispose()

Implements

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