public static class Pools.SimplePool
extends Object implements Pool<T>
| java.lang.Object | |
| ↳ | android.support.v4.util.Pools.SimplePool<T> |
| |
简单(非同步)的对象池。
Public constructors |
|
|---|---|
Pools.SimplePool(int maxPoolSize) 创建一个新的实例。 |
|
Public methods |
|
|---|---|
T |
acquire() |
boolean |
release(T instance) 将实例释放到池中。 |
Inherited methods |
|
|---|---|
java.lang.Object
|
|
android.support.v4.util.Pools.Pool
|
|
Pools.SimplePool (int maxPoolSize)
创建一个新的实例。
| Parameters | |
|---|---|
maxPoolSize |
int: The max pool size. |
| Throws | |
|---|---|
IllegalArgumentException |
If the max pool size is less than zero. |
T acquire ()
| Returns | |
|---|---|
T |
|
boolean release (T instance)
将实例释放到池中。
| Parameters | |
|---|---|
instance |
T: The instance to release. |
| Returns | |
|---|---|
boolean |
Whether the instance was put in the pool. |