Page Contents

Home > @loopback/pooling > PoolFactory > release

PoolFactory.release() method

To be called right before the resource is released to the pool. If it fails, the resource will be destroyed from the pool. This method should be used to clean up the resource to be returned.

Signature:

release?(resource: T): ValueOrPromise<void>;

Parameters

Parameter Type Description
resource T Resource instance

Returns:

ValueOrPromise<void>