我們已經創建了下面的代碼GroupByVisitor: -釋放內存後GetFeatures Geotools
GroupByVisitor visitor = new GroupByVisitorBuilder().withAggregateAttribute(CQL.toExpression(strColumn))
.withAggregateVisitor("Count").withGroupByAttribute(CQL.toExpression(strColumn)).build();
此時所使用的內存是150-180Mb。 並用下面的代碼應用此之後: - 這點存儲器之後
sfc.getFeatures().accepts(visitor, null);
visitor.getResult()
跨越1800Mb。但在此之後不會發布。 如何在獲取所有值後釋放內存?
甚至System.gc();
還沒有釋放所有的內存。
什麼樣的對象是sfc? –
'SimpleFeatureSource' –
@iant我們如何在'SimpleFeatureSource'上調用'GetFeatures()'之後釋放內存請建議。 –