本文介绍了您如何删除用于移动设备的 Spark Listform 中的 itemrenderer?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有自定义 mxml itemRenderer 的 spark ListForm,itemRenderer 的所有内容是:

I've got a spark ListForm with a custom mxml itemRenderer,all the itemRenderer has is:

<s:Label text="{data.name}" />

当我运行分析器时,列表表单没有重新使用 itemRenderer,实例不断增加,我使用 arrayCollection 作为数据提供者.我什至调用 dataprovider (arrayCollection) .removeAll() 和显示变为空白,但 itemRenderer 的实例数量不下去.然后我在分析器中运行垃圾收集器,然后项目渲染器仍然留在内存中.如何从内存中删除 itemRenderer?

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?

推荐答案

如果您只想将标签作为项目渲染器,那么在移动应用程序中建议使用LabelItemRenderer

if you just want a label as an item renderer then in mobile applications it's recommended to use the LabelItemRenderer

这篇关于您如何删除用于移动设备的 Spark Listform 中的 itemrenderer?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 16:08