0

template.fetch()使用すると OutOfMemoryExceptionが発生するという理論上の可能性はありますか? たとえば、100 回ループし、そのたびtemplate.fetch()に呼び出されるループがあるとします。それは次のようになります。

List<Building> buildings = repository.getBuildings();
for(Building b : buildings) {
    Country c = repository.include(b.getCountry()); // this calls template.fetch()
    // do something with country..
}

一定量のループの後、フェッチが非常に遅くなり、OutOfMemoryException がスローされます。フェッチが問題になる可能性がありますか? その場合、どのように処理できますか?

乾杯

4

1 に答える 1