Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-5361

Table View Scroll Extreme Garbage Collection Starvation

    Details

      Description

      Problem

      When scrolling a table view, memory rapidly diminishes until you stop scrolling. Once you stop scrolling AND LIFT UP YOUR FINGER the memory releases.

      How To Reproduce

      • Drop the following in an app.js
      • Scroll down and watch the memory fall
      • Touch and hold down with your finger to interrupt the table's deceleration and freeze it in place (figuratively speaking)
      • Watch the memory stay where it is
      • Let go with your finger
      • Watch the memory go back up

      app.js

      var PLEASE_BLEED_MEMORY = true;
      var win = Ti.UI.createWindow();
       
      var rows = [];
      for (var i = 0; i < 2000; i++) {
          var row = Ti.UI.createTableViewRow();
          row.add(row.label = Ti.UI.createLabel());
          if (PLEASE_BLEED_MEMORY) {
              row.label.text = 'blood and guts MU HA HA HA';
          }
          rows.push(row);    
      }
      win.add(Ti.UI.createTableView({ data: rows, bottom: 30 }));
       
      win.add(win.freeMemory = Ti.UI.createLabel({
          text: 'Free Memory: Loading...', textAlign: 'center',
          bottom: 0, height: 30, color: '#fff', backgroundColor: '#000'
      }));
      setInterval(function() {
          win.freeMemory.text = 'Free Memory: ' + Ti.Platform.availableMemory;
      }, 500);
       
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stephentramer Stephen Tramer
                Reporter:
                dtoth Dawson Toth
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-4543
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code