Class GenericMemoryPool<E>

java.lang.Object
org.jacop.jasat.utils.GenericMemoryPool<E>

@Deprecated public final class GenericMemoryPool<E> extends Object
Deprecated.
MemoryPool for arbitrary types. Less efficient than MemoryPool, but maybe more efficient than allocating. To be used if some data structure is often allocated/deallocated.
Version:
4.10
  • Field Details

  • Constructor Details

    • GenericMemoryPool

      public GenericMemoryPool(Factory<E> factory)
      Deprecated.
  • Method Details

    • getNew

      public E getNew()
      Deprecated.
      get an instance of E
      Returns:
      an instance of type E stored here, or a fresh instance from the factory
    • storeOld

      public void storeOld(E old)
      Deprecated.
      stores an instance of E for future uses
      Parameters:
      old - the E to store