public @NotNull T alloc() {
    if (myIndex == 0) {
      return myFactory.create();
    }

    int i = --myIndex;
    @SuppressWarnings("unchecked") T result = (T)myStorage[i];
    myStorage[i] = null;
    return result;
  }
public @NotNull T alloc()