问题描述
我有一个带有自定义mxml itemRenderer的$ ListForm,
所有的itemRenderer都是: < s:标签文本={data.name}/>
当我运行分析器时,listform不会再使用itemRenderer,
实例不断上涨,
我使用arrayCollection作为数据提供者。
我甚至调用dataprovider(arrayCollection).removeAll()和
显示为空,但itemRenderer的实例数
没有下降。然后我在分析器中运行垃圾回收器,
项目渲染器仍然保留在内存中。如何从内存中删除itemRenderer?
如果您只想将标签作为项目渲染器,那么在移动应用程序中,要使用
LabelItemRenderer
I've got a spark ListForm with a custom mxml itemRenderer,all the itemRenderer has is:
<s:Label text="{data.name}" />
When I run the profiler, the listform is not re-using the itemRenderers,the instances keep going up and up,I'm using an arrayCollection as the dataprovider.I even call the dataprovider (arrayCollection) .removeAll() and thedisplay goes blank, yet the number of instances of the itemRenderer doesnot go down. I then run the garbage collector in the profiler, and theitem renderers still stay in memory. How can I remove the itemRenderers from memory?
if you just want a label as an item renderer then in mobile applications it's recommended to use the LabelItemRenderer
这篇关于如何删除一个Spark Listform中的itemrenderer用于移动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!