java.lang.Object | |
↳ | android.support.v4.util.Pools |
Helper class for crating pools of objects. An example use looks like this:
public class MyPooledClass { private static final SynchronizedPoolsPool = new SynchronizedPool (10); public static MyPooledClass obtain() { MyPooledClass instance = sPool.acquire(); return (instance != null) ? instance : new MyPooledClass(); } public void recycle() { // Clear state if needed. sPool.release(this); } . . . }
Nested Classes | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Pools.Pool <T> | Interface for managing a pool of objects. | |||||||||||||||||||||||||||||||
|
Pools.SimplePool <T> | Simple (non-synchronized) pool of objects. | |||||||||||||||||||||||||||||||
|
Pools.SynchronizedPool <T> | Synchronized) pool of objects. |
[Expand]
Inherited Methods
|
|||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|