Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Adobe Flex SDK 4.0 (Release)
-
None
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Browser: Other (specify version)
Language Found: English
Description
Steps to reproduce:
1. create nested comboBox and sample data in parent view
private function init():void {
arr = new ArrayCollection([
new ArrayCollection(["a1","a2","a3","a4","a5","a6"]),
new ArrayCollection(["b1","b2","b3","b4","b5","b6"]),
new ArrayCollection(["c1","c2","c3","c4","c5","c6"]),
new ArrayCollection(["d1","d2","d3","d4","d5","d6"])
]);
}
<s:ComboBox dataProvider="
{arr}"
itemRenderer="components.NestedRenderer"
skinClass="spark.skins.spark.ComboBoxSkin">
</s:ComboBox>
2. create item renderer
<s:Label id="customLabel" text="collection:
{data}"/><mx:HBox id="customRepeaterContainer">
<mx:Repeater id="customRepeater" dataProvider="{data}
">
<!-- optional, even fails without this
<s:Label text="
"/>
-->
</mx:Repeater>
</mx:HBox>
3. do a couple of open/close cycles of the comboBox dropDown during the profiling. Filter the objects for the NestedRenderer. Note the steady increase of instances. Note the decrease by 1 when forcing the garbage collector to run. Restart profiling, make a memory snapshot before the first dropDown open, one while its open, one after the garbage collector. Then compare the object details for the NestedRenderer and not the disappearance of only the first Renderer where it should actually be all of them.
Actual Results:
4 Data elements, 5 Renderers created, 1 destroyed
Expected Results:
4 Data elements, 4 Renderers created, 4 destroyed
Workaround (if any):
for the PopupAnchor in the default ComboBoxSkin use property
itemDestructionPolicy="never"
this will keep the initially created item renderers instead of creating new ones every time the popup is opened