Show / Hide Table of Contents

Class PooledDictionaryHolder<TKey, TValue>

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

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

The type of the keys in the dictionary.

TValue

The type of the values in the dictionary.

Constructors

PooledDictionaryHolder(PooledObject<PooledDictionary<TKey, TValue>>)

Creates a new holder for the given pooled dictionary object.

Declaration
public PooledDictionaryHolder(PooledObject<PooledDictionary<TKey, TValue>> obj)
Parameters
Type Name Description
PooledObject<PooledDictionary<TKey, TValue>> obj

Pooled dictionary object to create a holder for.

Properties

Dictionary

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

Declaration
public Dictionary<TKey, TValue> Dictionary { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<TKey, TValue>

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

Methods

Dispose()

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

Declaration
public void Dispose()

Implements

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