0 Replies Latest reply on Aug 5, 2009 5:11 PM by Jason Szeto

    [svn:fx-trunk] 9124: http://bugs.adobe.com/jira/browse/ SDK-22488 - Odd bitmap sharing issue with custom DropDownList component using bitmap item renderer

    Jason Szeto Level 3

      Revision: 9124

      Author:   jszeto@adobe.com

      Date:     2009-08-05 17:11:14 -0700 (Wed, 05 Aug 2009)

       

      Log Message:

      ***********

      http://bugs.adobe.com/jira/browse/SDK-22488 - Odd bitmap sharing issue with custom DropDownList component using bitmap item renderer

       

      BitmapImage was disposing of the previous source whenever a new source was set. Since the button BitmapImage was always swapping in the selectedItem, it destroyed the previously selected item.

       

      The fix is to alter the code that disposes of the old source. If the BitmapImage created the BitmapData (because the source was a Class or DisplayObject), then it is responsible for disposing of it. Otherwise it is the developer's responsibility to dispose of the BitmapData.

       

      I updated the ASDoc to explain when BitmapImage will dispose of the BitmapData.

       

      QE notes: Add test cases

      Doc notes: Need to explain when the developer is responsible for disposing of the BitmapData.

      Bugs: SDK-22488

      Reviewer: Glenn

      Tests run: spark primitives

      Is noteworthy for integration: No

       

      Ticket Links:

      ************

          http://bugs.adobe.com/jira/browse/SDK-22488

          http://bugs.adobe.com/jira/browse/SDK-22488

       

      Modified Paths:

      **************

          flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as