Package com.badlogic.gdx.utils

Examples of com.badlogic.gdx.utils.ReflectionPool


      this.initialSize = 0;
      this.maxSize = 0;
    }
   
    public <T> T obtain(Class<T> type) {
      ReflectionPool pool = pools.get(type);
     
      if (pool == null) {
        pool = new ReflectionPool(type, initialSize, maxSize);
        pools.put(type, pool);
      }
     
      return (T)pool.obtain();
    }
View Full Code Here


    public void free(Object object) {
      if (object == null) {
        throw new IllegalArgumentException("object cannot be null.");
      }
     
      ReflectionPool pool = pools.get(object.getClass());
     
      if (pool == null) {
        return; // Ignore freeing an object that was never retained.
      }
     
      pool.free(object);
    }
View Full Code Here

      this.initialSize = 0;
      this.maxSize = 0;
    }
   
    public <T> T obtain(Class<T> type) {
      ReflectionPool pool = pools.get(type);
     
      if (pool == null) {
        pool = new ReflectionPool(type, initialSize, maxSize);
        pools.put(type, pool);
      }
     
      return (T)pool.obtain();
    }
View Full Code Here

    public void free(Object object) {
      if (object == null) {
        throw new IllegalArgumentException("object cannot be null.");
      }
     
      ReflectionPool pool = pools.get(object.getClass());
     
      if (pool == null) {
        return; // Ignore freeing an object that was never retained.
      }
     
      pool.free(object);
    }
View Full Code Here

      this.initialSize = 0;
      this.maxSize = 0;
    }
   
    public <T> T obtain(Class<T> type) {
      ReflectionPool pool = pools.get(type);
     
      if (pool == null) {
        pool = new ReflectionPool(type, initialSize, maxSize);
        pools.put(type, pool);
      }
     
      return (T)pool.obtain();
    }
View Full Code Here

    public void free(Object object) {
      if (object == null) {
        throw new IllegalArgumentException("object cannot be null.");
      }
     
      ReflectionPool pool = pools.get(object.getClass());
     
      if (pool == null) {
        return; // Ignore freeing an object that was never retained.
      }
     
      pool.free(object);
    }
View Full Code Here

      this.initialSize = 0;
      this.maxSize = 0;
    }
   
    public <T> T obtain(Class<T> type) {
      ReflectionPool pool = pools.get(type);
     
      if (pool == null) {
        pool = new ReflectionPool(type, initialSize, maxSize);
        pools.put(type, pool);
      }
     
      return (T)pool.obtain();
    }
View Full Code Here

    public void free(Object object) {
      if (object == null) {
        throw new IllegalArgumentException("object cannot be null.");
      }
     
      ReflectionPool pool = pools.get(object.getClass());
     
      if (pool == null) {
        return; // Ignore freeing an object that was never retained.
      }
     
      pool.free(object);
    }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.utils.ReflectionPool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.