Example usage for com.badlogic.gdx.utils Pool clear

List of usage examples for com.badlogic.gdx.utils Pool clear

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils Pool clear.

Prototype

public void clear() 

Source Link

Document

Removes all free objects from this pool.

Usage

From source file:io.piotrjastrzebski.sfg.utils.PoolUtils.java

License:Open Source License

/**
 * free and clear all objects//from   w  w  w  .  jav a2 s .  c om
 */
public static <T extends Pool.Poolable> void dispose(Class<T> classToDispose, Array<T> toDispose) {
    Pool<T> pool = Pools.get(classToDispose);
    if (toDispose != null)
        pool.freeAll(toDispose);
    pool.clear();
}