Fail Case / Test Case
1. Create a new app.
2. Replace the contents of the app's app.js with the code below.
3. Run the app.
Symptom
Even though the app only contains a 30-row table view with a small (46x43) image on each row, it can easily run out of memory. You might even see (depending on memory on your device) that not every row gets the image to begin with, because memory already ran out while rendering the table. Otherwise, scroll up and down in the table view, and check logcat -- eventually you'll start seeing long exception traces for an out of memory condition.
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title:'Test',
backgroundColor:'#000',
exitOnClose: true
});
var rows = [];
for (var i = 0; i < 30; i++) {
var row = Ti.UI.createTableViewRow({height: "40dp"});
var iv = Ti.UI.createImageView({image: "KS_nav_ui.png", height: "43"});
row.add(iv);
rows.push(row);
}
var tv = Ti.UI.createTableView({data: rows});
win.add(tv);
win.open();
Verified fix on: SDK build: 1.8.0.1.RC3 Runtime: V8, Rhino Titanium Studio, build: 1.0.7.201112152014 OS: Mac OS X Lion Device: Nexus One (2.2.2) Note: Did not verify fix on sdk build 1.9.0
Closing bug. Already verified fix on 1.8.0.1