open class Pool<T : Any>(reset: (T) -> Unit = {}, preallocate: Int = 0, gen: (Int) -> T)
Structure containing a set of reusable objects.
The method alloc retrieves from the pool or allocates a new object, while the free method pushes back one element to the pool and resets it to reuse it.