All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool Maven / Gradle / Ivy

Go to download

A fast and efficient image loading library for Android focused on smooth scrolling.

There is a newer version: 5.0.0-rc01
Show newest version
package com.bumptech.glide.load.engine.bitmap_recycle;

/**
 * Interface for an array pool that pools arrays of different types.
 */
public interface ArrayPool {
  /**
   * A standard size to use to increase hit rates when the required size isn't defined.
   * Currently 64KB.
   */
  int STANDARD_BUFFER_SIZE_BYTES = 64 * 1024;

  /**
   * Optionally adds the given array of the given type to the pool.
   *
   * 

Arrays may be ignored, for example if the array is larger than the maximum size of the * pool. */ void put(T array, Class arrayClass); /** * Returns a non-null array of the given type with a length >= to the given size. * *

If an array of the given size isn't in the pool, a new one will be allocated. * *

This class makes no guarantees about the contents of the returned array. */ T get(int size, Class arrayClass); /** * Clears all arrays from the pool. */ void clearMemory(); /** * Trims the size to the appropriate level. * * @param level A trim specified in {@link android.content.ComponentCallbacks2}. */ void trimMemory(int level); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy