useBorrowed

inline fun <T : Any, R> ObjectPool<T>.useBorrowed(block: (T) -> R): R(source)

Deprecated

Use useInstance instead

Replace with

useInstance(block)

Borrows and instance of T from the pool, invokes block with it and finally recycles it

Report a problem