Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-1733

TiAPI: Changing image property of ImageView causes memory leak

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Component/s: Titanium SDK & CLI
    • Environment:

      Android (and iOS)
      Titanium SDK 3.1.1
      Android 4.1

      Description

      Problem
      We are using a simple window and image view where we every ten seconds change the image property. The object allocates memory every time the image is changed the memory footprint increases until a crash occurs. The app must work on Android and we have verified the problem on both emulator and device. I have also verified the problem with instruments on iOS Simulator where the memory allocations increase over time (hours and days).

      Test case
      See attached sample.

      Steps to reproduce
      For Android:
      1. Import project
      2. Run it in Android, we use OS 4.x.
      3. Look at the GC sum in the monitor and observe how it increases
      4. Return 1 hour later to see an increase

      For iOS:
      In instruments with the iOS simulator, the "alloc" functions increase.

      Note
      We tried to move the image property setting outside the interval but without luck. We have also tried to set it to null as you can see with the prior imageview object to make sure it cleans up. We also tried to use 16 images (you can too by multiplying the images up to 16.jpg and set the index if statement to 16 so that you give more time for GC, but it does not help).

        Attachments

          Activity

            People

            • Assignee:
              shossain Shak Hossain (Inactive)
              Reporter:
              buder Jörgen Buder
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code