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.177-beta
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