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.
release?(resource: T): ValueOrPromise<void>;