Hi all,
I'm having an issue that I can't seem to wrap my head around related to the
lack of garbage collection.
I have a status screen that displays a somewhat complicated list of items in a
DataContainer.
When this screen is viewed, it polls the backend (every second) for an updated
list of data that is converted into an ArrayListView and bound to a
DataContainer with a custom renderer.
The view updates exactly as expected, but the problem is, the application
memory footprint grows very fast (several MB per second), and never seems to
perform any garbage collection what-so-ever. Even when I stop the polling.
As for code, here is a small snippet. It's fairly simple.
private function onFindAllAgents(event:ResultEvent):void
{
agents = new ArrayListView(event.result as ArrayList);
agents.sort = new Sort([new SortField("sortLevel", false,
false, true)]);
agents.refresh();
}
<j:DataContainer width="100%"
dataProvider="{agents}"
itemRenderer="com.teo.view.acdsupervisor.renderers.AgentItemRenderer">
<j:beads>
<j:RemoveAllItemRendererForArrayListData />
<js:CollectionChangeUpdateForArrayListData />
<!-- <j:RemoveAllItemRendererForArrayListData />
<js:DynamicAddItemRendererForArrayListData />
<js:DynamicRemoveItemRendererForArrayListData />
<js:DynamicUpdateItemRendererForArrayListData />
<js:DynamicRemoveAllItemRendererForArrayListData /> -->
</j:beads>
</j:DataContainer>
As you can see, I've been playing around with other beads, but I'm quite sure
what they do, or if they are even necessary.
CollectionChangeUpdateForArrayListData is necessary for ArrayListView
(probably should be renamed...), but I don't understand the others.
Is there something I am missing?
Any help will be greatly appreciated!
Brian