ObjectPool

constructor(capacity: Int, factory: () -> T, reset: (T) -> Unit = {})

Creates an empty pool. No instance is created until the first borrow on an empty pool.

Type Parameters

T

the pooled instance type.