Pool which keeps track of the obtained items (see obtain()), which can be free'd all at once using the
flush() method.
| Modifier and Type | Field and Description |
|---|---|
| protected Array |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | free(T object)
Overrides com. Puts the specified object in the pool, making it eligible to be returned by |
| public void | freeAll(Array<T> objects)
Overrides com. Puts the specified objects in the pool. |
| public T |
| obtained | back to summary |
|---|---|
| protected Array<T> obtained | |
| FlushablePool | back to summary |
|---|---|
| public FlushablePool() | |
| FlushablePool | back to summary |
|---|---|
| public FlushablePool(int initialCapacity) | |
| FlushablePool | back to summary |
|---|---|
| public FlushablePool(int initialCapacity, int max) | |
| flush | back to summary |
|---|---|
| public void flush() Frees all obtained instances. | |
| free | back to summary |
|---|---|
| public void free(T object) Overrides com. Doc from com. Puts the specified object in the pool, making it eligible to be returned by The pool does not check if an object is already freed, so the same object must not be freed multiple times.
| |
| freeAll | back to summary |
|---|---|
| public void freeAll(Array<T> objects) Overrides com. Doc from com. Puts the specified objects in the pool. Null objects within the array are silently ignored. The pool does not check if an object is already freed, so the same object must not be freed multiple times.
| |
| obtain | back to summary |
|---|---|
| public T obtain() Overrides com. Doc from com. Returns an object from this pool. The object may be new (from
| |