WeaverUtilities.

WeaverUtilities.CollectionPool<TCollection, TElement> Class

Summary

Maintains a pool of System.Collections.Generic.ICollection`1 so they can be reused without garbage collection.
Assembly
Weaver.dll
Namespace
Weaver
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["WeaverUtilities.CollectionPool<TCollection, TElement>"] class Type type-node

Syntax

public static class WeaverUtilities.CollectionPool<TCollection, TElement> 
    where TCollection : ICollection<TElement>, new()

Type Parameters

Name Description
TCollection
TElement

Methods

Name Value Summary
Get() TCollection
Returns an available collection from the pool or creates a new one if there are none.
static
Release(TCollection) void
Clears a collection and puts it into the pool to be available for future use.
static