Click or drag to resize

ReusableObjectPool Class

Note: This API is now obsolete.

Represents a reusable object pool that can be used by an application.
Inheritance Hierarchy
SystemObject
  GSFReusableObjectPool

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax
[ObsoleteAttribute("It is not recommended to use this class because the need for pooling is rare and implementations of pooling can be dangerous.")]
public static class ReusableObjectPool
View Source

The ReusableObjectPool type exposes the following members.

Methods
 NameDescription
Public methodStatic memberClear Releases all the objects currently cached in the specified pool.
Public methodStatic memberReturnObject Returns object to the pool.
Public methodStatic memberSetPoolSize Allocates the pool to the desired size.
Public methodStatic memberTakeObject(Type) Gets an object from the pool, or creates a new one if no pool items are available.
Public methodStatic memberTakeObjectT(Type) Gets an object from the pool, or creates a new one if no pool items are available.
Top
Remarks

See ReusableObjectPoolT for more details on using object pooling.

ReusableObjectPool should be used when you only have the Type of an object available (such as when you are using reflection), otherwise you should use the generic ReusableObjectPoolT.

See Also

Reference

GSF Namespace