public void releaseAll() {
    Iterator<ByteBuffer> iterator = pool.values().iterator();
    while (iterator.hasNext()) {
      ByteBuffer buffer = iterator.next();
      iterator.remove();
      releaser.accept(buffer);
    }
  }
public void releaseAll()