Show / Hide Table of Contents

Class ObjectPool<T>

Pool of objects.

Inheritance
System.Object
ObjectPool<T>
Namespace: GraphShape.Controls
Assembly: GraphShape.Controls.dll
Syntax
public class ObjectPool<T> : object where T : IPoolObject, new()
Type Parameters
Name Description
T

Pool object type.

Constructors

| Improve this Doc View Source

ObjectPool()

Pool constructor, pool will allow growth.

Declaration
public ObjectPool()
| Improve this Doc View Source

ObjectPool(Int32, Boolean)

Pool constructor.

Declaration
public ObjectPool(int initialPoolSize, bool allowPoolGrowth)
Parameters
Type Name Description
System.Int32 initialPoolSize

Initial pool size.

System.Boolean allowPoolGrowth

Allow pool growth or not.

Methods

| Improve this Doc View Source

GetObject()

Gets an object from the pool.

Declaration
public T GetObject()
Returns
Type Description
T

Returns with the object or null if there isn't any free objects and the pool does not allow growth.

Extension Methods

GraphHelpers.GetDistances<TVertex, TEdge, TGraph>(TGraph)
GraphHelpers.GetDiameter<TVertex, TEdge, TGraph>(TGraph)
GraphHelpers.GetDiameter<TVertex, TEdge, TGraph>(TGraph, out Double[,])
  • Improve this Doc
  • View Source
In This Article
Back to top GraphShape