javaFlacEncoder
Class ArrayRecycler

java.lang.Object
  extended by javaFlacEncoder.ArrayRecycler

public class ArrayRecycler
extends java.lang.Object

The purpose of this class is to provide a source for reusable int arrays. When using large numbers of arrays in succession, it is inefficient to constantly go in an allocate/free loop. This way, we may pass a single, thread-safe recycler to all objects. No matter where the arrays end their life, we can then add it to the same resource store.

Author:
Preston Lacey

Method Summary
 void add(int[] array)
           
 int[] getArray(int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public void add(int[] array)

getArray

public int[] getArray(int size)
Parameters:
size -
Returns: