Dear All,
Our application in production started throwing outofmemory error recently. I used JProbe profiler to narrow down lottering objects.
I found that there is an arraylist which in turn holds many DTO objects is not getting released. I create this arraylist in view bean and loop it through in
jsp using c:forEach tag. I found from profiler that c:forEach tag is holding live references hence this object is not getting garbage collected. I confirmed it by removing c:forEach tag and putting scriplets instead. The instances are getting garbage collected perfectly when used with scriplets!!
I tried removing the variables using c:remove tag. But didn't help. Please find below the piece of code.
Can someone please suggest me how can I make this "attribute" variable reference to null? Really don't want to use scriplet since it will be a step back.
Thanks in advance