Pool

interface Pool<T>

Pool provides an interface for managing a pool of object instances.

Parameters

the pooled type

Inheritors

Functions

Link copied to clipboard
abstract fun acquire(): T?

Acquires an instance from the pool. This returns null if the pool is empty.

Link copied to clipboard
abstract fun release(instance: T?)

Releases an instance to the pool. This has no effect if the instance is null.