SimplePool

open class SimplePool<T : Any>(@IntRange(from = 1) maxPoolSize: Int) : Pools.Pool<T> (source)

Simple (non-synchronized) pool of objects.

Parameters

maxPoolSize

The maximum pool size

T

The pooled type.

Inheritors

Constructors

Link copied to clipboard
constructor(@IntRange(from = 1) maxPoolSize: Int)

Functions

Link copied to clipboard
open override fun acquire(): T?
Link copied to clipboard
open override fun release(instance: T): Boolean

Release an instance to the pool.