invoke

operator fun <Type> Pool<Type>.invoke(): Type

Allows to use a Pool instance as a functional object. When invoked with no parameters, Pool will provide an instance of the pooled object type.

Return

an instance of class obtained from the pool.

See also

Pool.obtain

operator fun <Type> Pool<Type>.invoke(free: Type)

Allows to use a Pool instance as a functional object. When invoked with a parameter, Pool will treat the passed parameter as an object freed to the pool.

Parameters

free

will be returned to the pool. Might be reset if it implements the Poolable interface.

See also

Pool.free