Class LimitedPool<T>

java.lang.Object
com.intellij.util.containers.LimitedPool<T>
Direct Known Subclasses:
LimitedPool.Sync

public class LimitedPool<T> extends Object

A simple object pool which instantiates objects on-demand and keeps up to the given number of objects for later reuse.

Note: the class is not thread-safe; use synchronized version for concurrent access.

  • Constructor Details

  • Method Details

    • alloc

      @NotNull public T alloc()
    • recycle

      public void recycle(@NotNull T t)