FactoryPools
Provides implementations of Pool never return null
, log when new instances are created, and that can use the com.bumptech.glide.util.pool.FactoryPools.Poolable interface to ensure objects aren't used while inside the pool.
Types
Functions
Link copied to clipboard
open fun <T : FactoryPools.Poolable?> simple(size: Int, factory: FactoryPools.Factory<T>): Pool<T>
Content copied to clipboard
Returns a non-thread safe Pool that never returns
null
from acquire and that contains objects of the type created by the given Factory with the given maximum size.Link copied to clipboard
open fun <T : FactoryPools.Poolable?> threadSafe(size: Int, factory: FactoryPools.Factory<T>): Pool<T>
Content copied to clipboard
Returns a new thread safe Pool that never returns
null
from acquire and that contains objects of the type created by the given Factory with the given maximum size.Link copied to clipboard
Returns a new Pool that never returns
null
and that contains Lists of a specific generic type with a standard maximum size of 20.Returns a new thread safe Pool that never returns
null
and that contains Lists of a specific generic type with the given maximum size.