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

The Spark Image component causes there to be two instances of BitmapData rather than one

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • Spark: Image
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Create an application that uses s:Image.
      2. Set the source of the image to a URL. (I used a file URL.)
      3. Run the application in the profiler and note how many instances of BitmapData exist.
      4. Change the image to a new URL and check your instance count again (even after forcing garbage collection).

      Actual Results:
      There are always two instances of BitmapData. Never more than two, but there are two when there should only be one. This is a problem because twice as much memory is being used as is necessary. On the desktop, this isn't noticeable, but on mobile, it can mean the difference between an application crashing and running correctly.

      Expected Results: There should always be only one instance of BitmapData.

      Workaround (if any): Rather than setting the source property to a URL, if you get the bytes of the image, create your own BitmapData, and assign that to the s:Image component, there will only be one instance of BitmapData (which is the correct behavior).

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: