|
ReusableObjectPoolTakeObject(Type) Method
|
Gets an object from the pool, or creates a new one if no pool items are available.
Namespace: GSFAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax Public Shared Function TakeObject (
type As Type
) As Object
GSF.ReusableObjectPool.TakeObject = function(type);
View SourceParameters
- type Type
- Type of object to get from pool.
Return Value
ObjectAn available object from the pool, or a new one if no pool items are available.
Exceptions Remarks
If
type implements
ISupportLifecycle, the pool will attach
to the item's
Disposed event such that the object can be automatically
restored to the pool upon
Dispose. It will be up to class implementors to
make sure
Initialize makes the class ready for use as this method will
always be called for an object being taken from the pool.
See Also