private TextSubLine ensureEnoughSubLines(int numLines) {
    for (int i = textSubLines.size(); i < numLines; i++) {
      textSubLines.add(new TextSubLine());
    }
    return textSubLines.get(numLines - 1);
  }
Elements are reused and not deleted to save allocations.
lottie/src/main/java/com/airbnb/lottie/model/layer/TextLayer.java