{ "id": "116984", "key": "TIMOB-14498", "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": "15564", "description": "2013 Sprint 15 API", "name": "2013 Sprint 15 API", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "15567", "description": "2013 Sprint 15", "name": "2013 Sprint 15", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" }, { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-07-22T23:43:15.000+0000", "created": "2013-07-09T09:29:07.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ios", "mobile", "mobilesdk", "qe-closed-3.2.3", "titanium" ], "versions": [ { "id": "14613", "description": "Release 2.1.4", "name": "Release 2.1.4", "archived": true, "released": true, "releaseDate": "2012-11-12" }, { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [ { "id": "30340", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "94022", "key": "TIMOB-9826", "fields": { "summary": "iOS: ScrollableView - Scrollable View on iOS is leaking memory on new iPad/iPad 3 ", "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": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:43:14.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": "Whenever i set any property in tiapp.xml, application reports a memory leak when analyzed using Instrument.\r\n\r\nSteps to reproduce:\r\n\r\n1: Create a sample application and either cloud enable this or set\r\nany property like this in the tiapp.xml\r\n\r\nsystem\r\n\r\n2: Build the application using titanium studio.\r\n3: analyze the application using instrument for memory leaks.\r\n4: after few seconds, instrument will show memory leaks.\r\n5: check the source file for leak.\r\n6: ApplicationDefault.m will be reported for leaks.\r\n6: Code written there and responsible for leak is:\r\n{code}\r\n@implementation ApplicationDefaults\r\n \r\n+ (NSMutableDictionary*) copyDefaults\r\n{\r\n NSMutableDictionary * _property = [[NSMutableDictionary alloc] init];\r\n\r\n [_property setObject:[TiUtils stringValue:@\"system\"] forKey:@\"ti.ui.defaultunit\"];\r\n\r\n return _property;\r\n}\r\n@end\r\n{code}.\r\n\r\nPossible Solution:\r\n\r\nAs per my understanding and finding, dictionary object should have been autoreleased while creating, so the above sample must have been written like:\r\n\r\n{code}\r\n@implementation ApplicationDefaults\r\n \r\n+ (NSMutableDictionary*) copyDefaults\r\n{\r\n NSMutableDictionary * _property = [[[NSMutableDictionary alloc] init] autorelease];\r\n\r\n [_property setObject:[TiUtils stringValue:@\"system\"] forKey:@\"ti.ui.defaultunit\"];\r\n\r\n return _property;\r\n}\r\n@end\r\n{code}", "attachment": [ { "id": "40584", "filename": "Instruments_report.trace", "author": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-07-09T09:29:07.000+0000", "size": 204, "mimeType": "application/octet-stream" }, { "id": "40581", "filename": "Memory Leak1.png", "author": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-07-09T09:29:07.000+0000", "size": 251658, "mimeType": "image/png" }, { "id": "40582", "filename": "Memory Leak2.png", "author": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-07-09T09:29:07.000+0000", "size": 225222, "mimeType": "image/png" }, { "id": "40583", "filename": "Memory Leak3.png", "author": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-07-09T09:29:07.000+0000", "size": 228281, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Memory Leak issue for property set in tiapp.xml", "creator": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "Titanium Mobile SDK, iOS", "comment": { "comments": [ { "id": "262753", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This is a dupe issue and has already been fixed since 3.0.0\r\n\r\n", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-22T23:43:15.000+0000", "updated": "2013-07-22T23:43:15.000+0000" }, { "id": "301722", "author": { "name": "dpandey", "key": "dpandey", "displayName": "Deepti Pandey", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified as FIXED using :\r\nOSX: 10.9.2\r\nXcode:5.1.1\r\nacs@1.0.14\r\nalloy@1.3.1\r\nnpm@1.3.2\r\ntitanium@3.2.3-beta2\r\ntitanium-code-processor@1.1.1-beta1\r\nMobileSDK :3.2.3.v20140418101718 ,3.3.0.v20140418162516\r\nAppcelerator Studio, build: 3.2.3.201404162038\r\nDevices Used : iPhone 5s (7.1) ; iPod touch (7.1)\r\n\r\nNo memory leaks have been noticed by adding system in the default project. Hence closing this ticket as FIXED.", "updateAuthor": { "name": "dpandey", "key": "dpandey", "displayName": "Deepti Pandey", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-21T10:00:11.000+0000", "updated": "2014-04-21T10:00:11.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }