|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bulletphysics.util.ObjectPool<T>
public class ObjectPool<T>
Object pool.
| Constructor Summary | |
|---|---|
ObjectPool(Class<T> cls)
|
|
| Method Summary | ||
|---|---|---|
static void |
cleanCurrentThread()
|
|
T |
get()
Returns instance from pool, or create one if pool is empty. |
|
static
|
get(Class<T> cls)
Returns per-thread object pool for given type, or create one if it doesn't exist. |
|
void |
release(T obj)
Release instance into pool. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectPool(Class<T> cls)
| Method Detail |
|---|
public T get()
public void release(T obj)
obj - previously obtained instance from poolpublic static <T> ObjectPool<T> get(Class<T> cls)
cls - type
public static void cleanCurrentThread()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||