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