Method
Pool::release
Gives a borrowed instance back, for the next borrower.
Description#
public Pool::release(
object $instance
): voidParameters#
- $instance object
- An instance from
borrow()
Errors / Exceptions#
| Exception | When |
|---|---|
LogicException | If the pool did not lend it |
See also#
Pool::discardGives a borrowed instance back as broken: the pool forgets it, passes it to$dispose, and makes a new one when needed.