use

inline fun <E : Any, R> Pool<E>.use(action: (E) -> R): R

Scoped use of a pooled object. Automatically recycles the object after use.

Return

Result of the action

Parameters

action

Function to execute with the borrowed object