{ "id": "62245", "key": "TIMOB-1613", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2017-08-08T18:47:46.000+0000", "created": "2011-04-15T02:57:20.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "core" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "14395", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "79888", "key": "AC-3150", "fields": { "summary": "iOS: UI - tableViewRow backgroundImage not released from memory", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-08-08T18:47:46.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

I think my problem only occurs when ran from inside a\r\nsetInterval. If I simply load 150 images sequentially into an\r\nimageview's image, then only 15 MB of real memory is used. However,\r\nwhen performed inside the setInterval's callback, the real memory\r\nusage escalates to nearly 60 MB if 100 images are used, and up to\r\nabout 100 MB if 150 images are used. It will stay at that level\r\nthroughout subsequent loops until the app is shut down. I obtained\r\nthese numbers by running Instruments with Activity Monitor.

\r\n

I have attached a sample project with the relevant 10-12 lines\r\nof code in the app.js file and 100 images of 20 KB each.

{html}", "attachment": [ { "id": "18025", "filename": "testimageview.zip", "author": { "name": "dhpublic(atgmail)", "key": "dhpublic(atgmail)", "displayName": "dhpublic (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:22.000+0000", "size": 1847849, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: ImageView not releasing memory when image reassigned", "creator": { "name": "dhpublic(atgmail)", "key": "dhpublic(atgmail)", "displayName": "dhpublic (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dhpublic(atgmail)", "key": "dhpublic(atgmail)", "displayName": "dhpublic (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126188", "author": { "name": "dhpublic(atgmail)", "key": "dhpublic(atgmail)", "displayName": "dhpublic (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

For quick reference, here are the relevant lines of\ncode.

\n
\nvar animationStep = 1;\nvar animationView = Titanium.UI.createImageView({
\n
\n\n\n
\n
\n
\n                width: 320, height: 385, top: 0});\n
\n
\n\n\n
\nwin1.add(animationView);\n\n
\nfunction updateAnimationCallback() {\n\n
\n
\nanimationView.image =\n            Ti.Filesystem.getFile(\n                   Titanium.Filesystem.resourcesDirectory, \n                   'images/' + animationStep + '.jpg');\nif (animationStep <= 100) {\n    animationStep++;\n} else {\n    animationStep = 1;\n}\n
\n
\n\n\n
\n}\n\n
\nsetInterval(updateAnimationCallback, 100);\n
{html}", "updateAuthor": { "name": "dhpublic(atgmail)", "key": "dhpublic(atgmail)", "displayName": "dhpublic (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:22.000+0000", "updated": "2011-04-15T02:57:22.000+0000" }, { "id": "126189", "author": { "name": "dhpublic(atgmail)", "key": "dhpublic(atgmail)", "displayName": "dhpublic (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Assigned this to Kevin, since he's the one who asked for the\nticket on the Q&A.

{html}", "updateAuthor": { "name": "dhpublic(atgmail)", "key": "dhpublic(atgmail)", "displayName": "dhpublic (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:22.000+0000", "updated": "2011-04-15T02:57:22.000+0000" }, { "id": "126190", "author": { "name": "kevinwhinnery", "key": "kevinwhinnery", "displayName": "kevinwhinnery", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

Thanks for creating the test case, that's very helpful.

{html}", "updateAuthor": { "name": "kevinwhinnery", "key": "kevinwhinnery", "displayName": "kevinwhinnery", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:23.000+0000", "updated": "2011-04-15T02:57:23.000+0000" }, { "id": "126191", "author": { "name": "dhpublic(atgmail)", "key": "dhpublic(atgmail)", "displayName": "dhpublic (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I assume no one's had a chance to look at this?

{html}", "updateAuthor": { "name": "dhpublic(atgmail)", "key": "dhpublic(atgmail)", "displayName": "dhpublic (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:23.000+0000", "updated": "2011-04-15T02:57:23.000+0000" }, { "id": "126192", "author": { "name": "dhpublic(atgmail)", "key": "dhpublic(atgmail)", "displayName": "dhpublic (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Since I'm not a paying customer, I certainly have no right to\ncomplain. But my inability to get answers here or in Q&A tells\nme I need to abandon the Appcelerator platform.

{html}", "updateAuthor": { "name": "dhpublic(atgmail)", "key": "dhpublic(atgmail)", "displayName": "dhpublic (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:23.000+0000", "updated": "2011-04-15T02:57:23.000+0000" }, { "id": "209456", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested SDK 2.2.0.f9e938d, still a valid test case. It is highly likely that this is caused by image caching and disabling it (especially for larger images like the ones in this test) is undesirable. Further investigation outside of scrub is required.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-25T16:34:30.000+0000", "updated": "2012-07-25T16:34:30.000+0000" }, { "id": "426207", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing due to inactivity. If this issue still exists, please raise a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-08-08T18:47:46.000+0000", "updated": "2017-08-08T18:47:46.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }