{ "id": "84832", "key": "TIMOB-7152", "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": [ { "id": "12096", "description": "", "name": "Sprint 2012-04", "archived": true, "released": true, "releaseDate": "2012-02-26" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-06T00:43:30.000+0000", "created": "2012-01-12T17:09:44.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_memory", "qe-testadded" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "15172", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "86455", "key": "TIMOB-7644", "fields": { "summary": "iOS: Memory is not being released when a tab is removed from tabGroup", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "15485", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "87247", "key": "TIMOB-7858", "fields": { "summary": "iOS: TabProxy is not being released when a tab is removed from tabGroup before it gets the focus", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-06T15:52:59.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\nObjects created in a Ti.UI.tabGroup are not released when the tabGroup is closed.\r\n\r\nh3. Reproducible steps:\r\n \r\n1. Run the code below.\r\n2. Use the instruments application to monitor the memory\r\n3. Click on Open tabgroup button\r\n4. Click on close button\r\n\r\nPlease see TiUITabproxy on the category. It is never released from the memory.\r\n\r\n\r\nh3. Expected behavior:\r\nCustomer wants to release the memory of a tab.\r\n\r\nh3. Tested with the next specs:\r\n\r\nSimulator\r\n\r\niPhone 4\r\nVersion of the device: 5.0.1\r\n\r\nTitanium Studio, build: 1.0.8.201112291658\r\nTitanium SDK: 1.8.0.1 \r\n\r\nh3.More info:\r\nPlease see the video attached.\r\n\r\nh3. Code:\r\n{Code}\r\nfunction createTabGroup() \r\n{\r\n\tvar colors = ['#ff9966', '#99ff66', '#6699ff', '#66ffff', '#ffff66'];\r\n\r\n\tfunction openWindowOnStack(i) \r\n\t{\r\n\t\tvar win = Ti.UI.createWindow(\r\n\t\t{\r\n\t\t\ttitle : 'Window ' + i,\r\n\t\t\tbackgroundColor : colors[i]\r\n\t\t});\r\n\t\t\r\n\t\twin.addEventListener('open', function(evt) \r\n\t\t{\r\n\t\t\tTi.API.info('Opened: ' + evt.source.title);\r\n\t\t\tif(i < 4) \r\n\t\t\t{\r\n\t\t\t\tsetTimeout(function() \r\n\t\t\t\t{\r\n\t\t\t\t\topenWindowOnStack(i + 1);\r\n\t\t\t\t}, 500);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\twin.addEventListener('close', function(evt) \r\n\t\t{\r\n\t\t\tTi.API.info('Closed: ' + evt.source.title);\r\n\t\t\ttrackClosedWindow(tab1, evt.source);\r\n\t\t});\r\n\t\t\r\n\t\topenInTab(tab1, win);\r\n\t}\r\n\r\n\tvar navButton = Ti.UI.createButton(\r\n\t{\r\n\t\ttitle : 'Open Windows'\r\n\t});\r\n\r\n\tvar outer = Ti.UI.createWindow(\r\n\t{\r\n\t\ttitle : 'Root Window',\r\n\t\tbackgroundColor : '#d0d0d0',\r\n\t\trightNavButton : navButton\r\n\t});\r\n\r\n\touter.rightNavButton.addEventListener('click', function() \r\n\t{\r\n\t\topenWindowOnStack(0);\r\n\t});\r\n\t\r\n\tfunction trackClosedWindow(thistab, window) \r\n\t{\r\n\t\tvar windows = thistab.windows || [];\r\n\t\t\r\n\t\tfor(var w = windows.length - 1; w >= 0; w--) \r\n\t\t{\r\n\t\t\tif(windows[w] == window) \r\n\t\t\t{\r\n\t\t\t\twindows[w] = null;\r\n\t\t\t\twindows.splice(w, 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthistab.windows = windows;\r\n\t}\r\n\r\n\tfunction closeAllInTab(thistab) \r\n\t{\r\n\t\tvar windows = thistab.windows || [];\r\n\t\t\r\n\t\tfor(var w = 0; w < windows.length; w++) \r\n\t\t{\r\n\t\t\twindows[w].close();\r\n\t\t\twindows[w] = null;\r\n\t\t}\r\n\t\t\r\n\t\tthistab.windows = windows = [];\r\n\t}\r\n\r\n\tfunction openInTab(thistab, window) \r\n\t{\r\n\t\tvar windows = thistab.windows || [];\r\n\t\twindows.push(window);\r\n\t\tthistab.open(window);\r\n\t\tthistab.windows = windows;\r\n\t}\r\n\r\n\tvar tabGroup = Ti.UI.createTabGroup();\r\n\t\r\n\tvar tab1 = Ti.UI.createTab(\r\n\t{\r\n\t\twindow : outer,\r\n\t\ttitle : 'Touch Me'\r\n\t});\r\n\t\r\n\ttabGroup.addTab(tab1);\r\n\r\n\tvar button2 = Ti.UI.createButton(\r\n\t{\r\n\t\ttitle : 'close',\r\n\t\theight : 35,\r\n\t\twidth : 200\r\n\t});\r\n\t\r\n\touter.add(button2);\r\n\t\r\n\tbutton2.addEventListener('click', function(e) \r\n\t{\r\n\r\n\t\touter.remove(button2);\r\n\t\touter.rightNavButton = null;\r\n\t\tbutton2 = null;\r\n\t\tnavButton = null;\r\n\r\n\t\tcloseAllInTab(tab1);\r\n\t\ttabGroup.removeTab(tab1);\r\n\t\ttab1.window = null;\r\n\t\ttab1 = null;\r\n\r\n\t\ttabGroup.tabs = null;\r\n\t\ttabGroup.close();\r\n\t\ttabGroup = null;\r\n\r\n\t\touter.close();\r\n\t\touter = null;\r\n\r\n\t\tTi.API.info('Closed tab group');\r\n\t});\r\n\t\r\n\treturn tabGroup;\r\n\r\n}\r\n\r\nvar win1 = Ti.UI.createWindow(\r\n{\r\n\tbackgroundColor : '#fff',\r\n\ttitle : \"Home\"\r\n});\r\n\r\nvar button1 = Ti.UI.createButton(\r\n{\r\n\ttitle : 'Open tabgroup',\r\n\theight : 35,\r\n\twidth : 200\r\n});\r\n\r\nbutton1.addEventListener('click', function(e) \r\n{\r\n\tvar tabGroup1 = createTabGroup();\r\n\ttabGroup1.open();\r\n\tTi.API.info('Opened tab group');\r\n});\r\n\r\nwin1.add(button1);\r\n\r\nwin1.open();\r\n\r\n{Code}\r\n\r\nh3. Helpdesk\r\nAPP-443889\r\n \r\n", "attachment": [ { "id": "25053", "filename": "Screen Recording.mov", "author": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-12T17:09:44.000+0000", "size": 3028823, "mimeType": "video/quicktime" } ], "flagged": false, "summary": "iOS: Memory Leak: Objects created in a Ti.UI.tabGroup are not released when the tabGroup is closed", "creator": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Simulator\r\n\r\niPhone 4\r\nVersion of the device: 5.0.1\r\n\r\nTitanium Studio, build: 1.0.8.201112291658\r\nTitanium SDK: 1.8.0.1", "comment": { "comments": [ { "id": "182003", "author": { "name": "mrlundis", "key": "mrlundis", "displayName": "Jonatan Lundin", "active": true, "timeZone": "Europe/Berlin" }, "body": "Has there been any progress made on this issue? I would very much like to see this fixed as well. ", "updateAuthor": { "name": "mrlundis", "key": "mrlundis", "displayName": "Jonatan Lundin", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-02-06T06:55:58.000+0000", "updated": "2012-02-06T06:55:58.000+0000" }, { "id": "183891", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Failing as PR 1474. Repo steps:\r\n\r\n1. Profile ticket code\r\n2. \"Open Tabgroup\"\r\n3. -> Note 1 TiUITabGroupProxy\r\n4. \"Open Windows\"\r\n5. Either:\r\n5a. Click back through the nav back button\r\n5b. Click the tab to return to the main window\r\n6. \"Close Tabgroup\"\r\n\r\n*PASS*: No {{TiUITabGroupProxy}} or {{TiUITabProxy}} objects in memory\r\n*FAIL*: Otherwise\r\n\r\n*NOTE*: When clicking back through the nav back buttons, note that *none* of the {{TiUIWindowProxy}} objects are released (although they are when you click the tab). This is another memory leak.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-21T17:03:34.000+0000", "updated": "2012-02-21T17:04:42.000+0000" }, { "id": "186653", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Verified fix on:\r\n\r\nSDK build: 2.0.0.v20120315123246\r\nTitanium Studio, build: 2.0.0.201203142055\r\nxcode: 4.2\r\nDevice: iphone 4s (5.0.1)\r\n\r\nNote to QE: It takes a while for the last TiUITabGroupProxy object to be released on device.", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-15T12:42:38.000+0000", "updated": "2012-03-15T12:42:38.000+0000" }, { "id": "191513", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening/closing to add/remove labels", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-17T17:27:01.000+0000", "updated": "2012-04-17T17:27:01.000+0000" }, { "id": "200705", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Both TiUITabGroupProxy and TiUITabProxy objects are not being released \r\n\r\nTested with Titanium SDK: 2.1.0.v20120627151616\r\nTested with Titanium  Studio: 2.1.0.201206251749\r\nDevices: iphone 3GS(5.0.1)\r\nOS: OSX 10.7.3\r\n\r\nThis was working fine on 2.1.0.v20120625134154 and 2.0.2\r\n", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-06-28T00:14:11.000+0000", "updated": "2012-06-28T00:14:11.000+0000" }, { "id": "200747", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Verified this is indeed not working on iOS 5.0+ devices but is working on 4.X devices.*\r\n\r\nThe Tab group is still visible on device on 5.0+ devices, while it is removed on 4.X devices\r\n\r\nTested with Ti Studio build 2.1.0.201206251749\r\nTi Mobile SDK 2.1.0.v20120627151616 hash r87081627\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.0.1 (Fail)\r\niPhone 3GS OS 4.3.5 (Pass)\r\n", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-28T10:00:57.000+0000", "updated": "2012-06-28T10:00:57.000+0000" }, { "id": "200777", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with Ti Studio build 2.1.0.201206251749\r\nTi Mobile SDK 2.1.0.v20120628121617 hash r6e3cab6a\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.0.1, iPhone 3GS OS 4.3.5\r\n\r\nVerified that the expected behavior is shown. *Note* It can take a few minutes for the proxy to be released", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-28T13:24:52.000+0000", "updated": "2012-06-28T13:24:52.000+0000" }, { "id": "201753", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Re-opening to edit labels.", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-06T00:42:52.000+0000", "updated": "2012-07-06T00:42:52.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }