Click or drag to resize

IPooledComponent Methods

The IPooledComponent type exposes the following members.

Methods
  NameDescription
Public methodOnGetFromPool
Invoked when this instance is retrieved from the pool. Any dependencies retrieved using the provided IComponentContext MUST be discarded in OnReturnToPool, otherwise memory leaks may occur.
Public methodOnReturnToPool

Invoked when this instance is being returned to the pool. Any dependencies retrieved in OnGetFromPool(IComponentContext, IEnumerableParameter) should be discarded in this method.

If the maximum pool capacity has been reached (or a custom IPooledRegistrationPolicyTPooledObject decides not to return the instance to the pool), this method will be invoked, but then the object will not be put back in the pool (and may be disposed if the component implements IDisposable).

Top
See Also