{ "id": "63747", "key": "TIMOB-3115", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": [ { "id": "15931", "description": "2014 Sprint 05", "name": "2014 Sprint 05", "archived": true, "released": true, "releaseDate": "2014-03-14" }, { "id": "15932", "description": "2014 Sprint 05 API", "name": "2014 Sprint 05 API", "archived": true, "released": true, "releaseDate": "2014-03-14" }, { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-03-03T20:40:25.000+0000", "created": "2011-04-15T03:37:18.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "3.2.1", "feature", "ios", "module_app", "qe-testadded", "rplist", "triage" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [ { "id": "15568", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "87445", "key": "TIMOB-7898", "fields": { "summary": "iOS: Expose applicationDidReceiveMemoryWarning to JavaScript side", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-03-19T11:13:08.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": "h3. Problem\r\n\r\nAssume you have a web view. When Titanium receives a memory warning, it cleans up the web view, releasing its resources. Now if the app is resumed, the web view will be blank. But a pure JS app has no way of knowing this has happened or handling this event, because we do not expose the didReceiveMemoryWarning event to the\r\nJS side of things.\r\n\r\nh3. Solution\r\n\r\nAdd a global event, \"didReceiveMemoryWarning\", so that developers can handle this scenario.\r\n\r\nh3. Workaround\r\n\r\nCreate an iOS module that fires this event for the JS to consume.\r\n\r\nh3. Associated Helpdesk Ticket\r\n\r\nhttp://developer.appcelerator.com/helpdesk/view/71071", "attachment": [], "flagged": false, "summary": "iOS: Expose didReceiveMemoryWarning Event to JS", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "269025", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "*PUSH* Could someone please address this problem? It needs to be a new EventListener that handles this event. Thank you!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-08-30T15:23:32.000+0000", "updated": "2013-08-30T15:23:32.000+0000" }, { "id": "269033", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hansknoechel] We are relatively packed for our next major feature release in December, but I have tentatively placed it in the following release.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-30T15:54:47.000+0000", "updated": "2013-08-30T15:54:47.000+0000" }, { "id": "269036", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thank you! It has been noticed, all good!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-08-30T16:00:35.000+0000", "updated": "2013-08-30T16:00:35.000+0000" }, { "id": "282158", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR pending: https://github.com/appcelerator/titanium_mobile/pull/5054", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-03T18:32:03.000+0000", "updated": "2013-12-03T18:32:03.000+0000" }, { "id": "295323", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR merged into master", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-03T20:40:25.000+0000", "updated": "2014-03-03T20:40:25.000+0000" }, { "id": "297753", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Backport to 3_2_X\nhttps://github.com/appcelerator/titanium_mobile/pull/5490", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-18T18:54:53.000+0000", "updated": "2014-03-18T18:54:53.000+0000" }, { "id": "297856", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified that 'didRecieveMemoryWarning' is exposed to JS as 'memorywarning' event.\r\n\r\nTestapp used to verify:\r\n\r\n{code}\r\n\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Home Window',\r\n backgroundColor:'#fff'\r\n});\r\nvar input = Ti.UI.createTextField({\r\n\thintText:'Enter number of rows to be generated',\r\n\ttop:20\r\n});\r\nvar but = Ti.UI.createButton({\r\n\ttitle:'Check Available memory',\r\n\ttop: 50\r\n});\r\nvar but1 = Ti.UI.createButton({\r\n\ttitle:'add '+input.getValue()+ 'table rows',\r\n\ttop: 80\r\n});\r\n\r\nvar tableData = [];\r\nbut.addEventListener('click',function(e){\r\n\talert(Titanium.Platform.getAvailableMemory() );\r\n});\r\nbut1.addEventListener('click',function(e){\r\n\tcreateRow();\r\n});\r\n\r\nvar table = Ti.UI.createTableView({ \r\n\tobjName: 'table',\r\n\ttop: 150\r\n\t });\r\n\t \r\n\r\nfunction createRow(){\r\n\tfor(var i = 0;i