Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-25007

DropDown of ComboBox removes only first nested itemRenderer / repeater when removed from stage

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Adobe Flex SDK 4.0 (Release)
    • Fix Version/s: None
    • Component/s: Spark: DropDownList
    • Labels:
      None
    • Environment:
      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="

      {customRepeater.currentItem}

      "/>
      -->
      </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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              adobejira Adobe JIRA
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: