Cells-Jar used : aspose-cells-21.6.jar
Scenario : We need to access the individual series points of the chart and apply specific properties.
For this we are using chart.calculate() method on the chart.
This internally generating an ArrayList of 20K java.lang.Double objects.
at java.lang.OutOfMemoryError.()V (OutOfMemoryError.java:48)
at java.util.Arrays.copyOf([Ljava/lang/Object;I)[Ljava/lang/Object; (Arrays.java:3181)
at java.util.ArrayList.grow(I)V (ArrayList.java:261)
at java.util.ArrayList.ensureExplicitCapacity(I)V (ArrayList.java:235)
at java.util.ArrayList.ensureCapacityInternal(I)V (ArrayList.java:227)
at java.util.ArrayList.add(Ljava/lang/Object;)Z (ArrayList.java:458)
at com.aspose.cells.b.a.a.zf.a(Ljava/util/ArrayList;Ljava/lang/Object;)I (Unknown Source)
at com.aspose.cells.zkn.b(Lcom/aspose/cells/zck;IDDDLjava/util/ArrayList;DDZZZ)V (Unknown Source)
at com.aspose.cells.zkn.a([DLcom/aspose/cells/zck;Lcom/aspose/cells/zbnq;FIDDDDZZZ)V (Unknown Source)
at com.aspose.cells.zkn.a(Lcom/aspose/cells/zck;DDIFZLcom/aspose/cells/zbnq;ZZZ)V (Unknown Source)
at com.aspose.cells.zkn.a(Lcom/aspose/cells/zkt;)V (Unknown Source)
at com.aspose.cells.zkt.ap()V (Unknown Source)
at com.aspose.cells.zmg.d(Lcom/aspose/cells/Chart;)Lcom/aspose/cells/zkt; (Unknown Source)
at com.aspose.cells.zkr.b(Lcom/aspose/cells/Chart;Z)V (Unknown Source)
at com.aspose.cells.zkr.a(Lcom/aspose/cells/Chart;ZZ)V (Unknown Source)
at com.aspose.cells.Chart.a(ZZ)V (Unknown Source)
at com.aspose.cells.Chart.calculate()V (Unknown Source)
Query : Is there a method to clear this object or any alternatives advisable to use here ?
- The similar issue was not reproducible with aspose-cells-19.11.jar
- This is happening in higher environments and couldnt share the related code for the same.
Thanks in advance,