IPooledComponentOnReturnToPool Method |
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).
Namespace: Autofac.Pooling