{ "id": "93088", "key": "TIMOB-9494", "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": "13503", "description": "Sprint 2012-14 Core", "name": "Sprint 2012-14 API", "archived": true, "released": true, "releaseDate": "2012-07-13" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-07-10T22:33:01.000+0000", "created": "2012-06-12T03:12:22.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "qe-ios060112" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-07-10T22:33:06.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": "Opening window added in the Navgroup shows an intermittent behavior while allocating and de-allocating the memory.\r\n\r\nThis is not a regression.This occurs as far as 1.8.2.\r\n\r\nSteps to Reproduce:\r\n\r\n1. Install the app on device and launch it.\r\n2. Open Developer/Applications/Instruments (Xcode Memory Profiler). \r\n3. Run the app through the profiler (monitor leaks). \r\n4. Choose Target -> Device, and Choose Target -> Choose Target -> App. Press record to run the app. \r\n5. Open each tab in the window (One, Two, Three), and close using the Close button. \r\n6. Open each tab in the window (One, Two, Three), and close using the Home Window button in the nav bar at the top.\r\n\r\napp.js\r\n{code}\r\nvar _window = Ti.UI.createWindow({\r\n\tbackgroundColor : 'blue'\r\n})\r\n// Global namespace\r\n\t\t\tvar App = {};\r\n\t\t\t// used to simulate global object\r\n\t\t\tvar Global = {};\r\n\t\t\t\r\n\t\t\t// Initial Window\r\n\t\t\tApp.homeWindow = Ti.UI.createWindow({\r\n\t\t\t\ttitle: 'Home Window'\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t// NavGroup\r\n\t\t\tApp.nav = Ti.UI.iPhone.createNavigationGroup({\r\n\t\t\t \twindow: App.homeWindow\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t// Module loader / helper\r\n\t\t\tApp.loadPage = function(_name, _params) {\r\n\t\t\t\t// Private\r\n\t\t\t\tvar win = Ti.UI.createWindow({ backgroundColor: '#eee' }),\r\n\t\t\t\t\tscrollable = Ti.UI.createScrollableView(),\r\n\t\t\t\t\tclose = null;\r\n\t\t\t\t\r\n\t\t\t\t// simluate exports object\t\r\n\t\t\t\tGlobal.exports = {};\r\n\t\t\t\t\r\n\t\t\t\t// Public\r\n\t\t\t\tGlobal.exports.load = function(_app, _params) {\r\n\t\t\t\t\twin.title = _params.title;\r\n\t\t\t\t\t\r\n\t\t\t\t\tclose = Ti.UI.createButton({\r\n\t\t\t\t\t\ttitle: 'close',\r\n\t\t\t\t\t\twidth: '50%',\r\n\t\t\t\t\t\theight: 75\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Closing the window means it will never get released\r\n\t\t\t\t\t// NOTE: It will get released if you hit the auto generated back button.\r\n\t\t\t\t\tclose.addEventListener('click', function() {\r\n\t\t\t\t\t\t_app.nav.close(win);\r\n\t\t\t\t\t\t// None of these free up memory:\r\n\t\t\t\t\t\twin = null;\r\n\t\t\t\t\t\tscrollable = null;\r\n\t\t\t\t\t\tGlobal.exports = null;\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\twin.add(scrollable);\r\n\t\t\t\t\twin.add(close);\r\n\t\t\t\t\t\r\n\t\t\t\t\t_app.nav.open(win);\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\tGlobal.exports.load(App, _params);\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Initial page\r\n\t\t\t */\r\n\t\t\tvar data = [\r\n\t\t\t\t{ title: 'One' },\r\n\t\t\t\t{ title: 'Two' },\r\n\t\t\t\t{ title: 'Three' },\r\n\t\t\t];\r\n\t\t\t\r\n\t\t\tvar table = Ti.UI.createTableView({\r\n\t\t\t\tdata: data\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\ttable.addEventListener('click', function(e) {\r\n\t\t\t\tApp.loadPage('someModule', {\r\n\t\t\t\t\ttitle: e.row.title\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tApp.homeWindow.add(table);\r\n\t\t\t\r\n\t\t\t_window.add(App.nav);\r\n\t\t\t_window.open();\r\n{code}\r\n\r\n\r\nActual Result:\r\nAt Step 6:The TiUIWindowPoxy variable is not deallocating the memory when windows closes.\r\nAlso,sometimes it is not even allocating the memory to the variable\r\n\r\nExpected Result:\r\nThe TiUIWindowPoxy variable should be deallocated when windows close.\r\n", "attachment": [], "flagged": false, "summary": "iOS:UI.iPhone.NavigationGroup - Opening window added in the Navgroup shows an intermittent behavior while allocating and de-allocating the memory.", "creator": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "Tested with Titanium SDK: 2.1.0.v20120608174150\r\nTested with Titanium  Studio: 2.1.0.201206081630\r\nPlatform & version: iOS (5.1)\r\nDevice details: iPHONE 4S\r\nHost Operating System: OSX 10.7.3", "comment": { "comments": [ { "id": "201426", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "\r\nTested on iPhone Simulator 4.3, 5.0 and 5.1, on device iPhone 4S running 5.1\r\nSDK build : 2.2.0 (master) build cf6f1330469d2238a5ca8f9f374e1312e51fdbe7.\r\nMac OSX 10.7.3\r\n", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-03T14:32:34.000+0000", "updated": "2012-07-03T14:32:34.000+0000" }, { "id": "215969", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Tested with:\r\nTitanium Studio: 2.1.2.201208201549\r\nTitanium SDK: 2.1.2.v20120821160113\r\nTitanium SDK: 2.2.0.v20120808154112\r\n\r\nThe problem of deallocation the memory still occurs.(i.e after following all the steps,one extra living is left for TiUiWindowProxy)", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-08-23T23:42:41.000+0000", "updated": "2012-08-23T23:42:41.000+0000" }, { "id": "215997", "author": { "name": "mbelkin", "key": "mbelkin", "displayName": "Michael Belkin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm also experiencing this issue with 2.1.1 GA", "updateAuthor": { "name": "mbelkin", "key": "mbelkin", "displayName": "Michael Belkin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-24T07:21:34.000+0000", "updated": "2012-08-24T07:21:34.000+0000" }, { "id": "423843", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed and lack of progress for a number of years. Please open a new ticket if there are any problems.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-07-10T22:33:01.000+0000", "updated": "2017-07-10T22:33:01.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }