1 Reply Latest reply on Feb 7, 2008 9:35 PM by Gaurav J

    Image Memory Leaks in AIR app

    kennyjay
      We are implementing an AIR application that loads thumbnails from the hard drive and uploads them to a remote server.

      When bringing in large images, for example, when importing five 2MB files into Image objects:

      Flex reports that it is using 55MB
      Windows reports using 220 Meg (viewing memory usage of adl.exe in task manager)

      After deletion of these image objects, the memory stays allocated!! It is released when the application is closed.

      Two issues I see:

      1. Huge memory usage for image objects (I understand that JPG files are exploded into BMPs). It limits our ability to load 10's or 100's of images.

      2. Bad Memory leak

      OTHER THINGS WE TRIED:

      1. Displaying images as inline html IMG tags.. Same memory usage!
      2. Taking a snapshot of the image and displaying that. Problem, used way to much CPU

      I hope these issues will be fixed before release time or we are hosed.

      PLATFORM: Windows XP Professional, service pack 2
        • 1. Re: Image Memory Leaks in AIR app
          Gaurav J Adobe Employee
          Hi

          Have you tried the FB3 profiler to investigate why memory is not getting deallocated?

          You can use the loitering objects panel to track the back references for the objects in memory. If you find that image object is not being referenced by anything else. Can you file a bug at http://bugs.adobe.com/flex with a small test case.

          Also as you know that jpg will be translated into bitmap. The amount of memory required will be determined by the pixels in the image. Each pixel will be 4K

          Thanks,
          Gaurav Jain
          Flex SDK Team