ObjectPool

open class ObjectPool

Created by dodo on 17/11/14.

Constructors

Link copied to clipboard
constructor(@NonNull factory: PoolObjectFactory, maxSize: Int)
Constructor.

Functions

Link copied to clipboard
open fun freeObject(@NonNull obj: PoolObject)
Stores an object instance in the pool to make it available for a subsequent call to newObject() (the object is considered free).
Link copied to clipboard
@NonNull
open fun newObject(): PoolObject
Creates a new object or returns a free object from the pool.