{ "id": "172176", "key": "TIMOB-26475", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": null, "resolutiondate": null, "created": "2018-09-05T14:23:27.000+0000", "priority": null, "labels": [ "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-10-20T22:31:22.000+0000", "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" } }, "components": [], "description": "What happened:\r\n\r\n# Index\r\n# Added a map to a secondary window\r\n# Added many annotations to the map with a custom view each\r\n# Running the app:\r\n# * From the index, I open the secondary window containing the map. I let it load some annotations, then go back.\r\n# * The app crashes\r\n\r\nFrom the logs, it read that some objects were not cleaned before closing the window. \r\nListening to the close event didn't work since it is fired after the window has closed.\r\n\r\nAdded a `willclose` event to do all the cleanup before actually closing the window. \r\n\r\nCommit https://github.com/caffeinalab/titanium_mobile/commit/849717ced4f7a0b7c33439a70c7cac056b33400d\r\n\r\nPR to come", "attachment": [], "flagged": false, "summary": "Adding willclose event on window", "creator": { "name": "sinanajani", "key": "sinanajani", "displayName": "Ani Sinanaj", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sinanajani", "key": "sinanajani", "displayName": "Ani Sinanaj", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "441361", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "It looks like rather Ti.Map should be improved to handle this than a new, iOS-only event. Also, the \"blur\" event comes pretty close to this state, which is called before the \"close\" event.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-05T19:46:02.000+0000", "updated": "2018-09-05T19:46:02.000+0000" }, { "id": "441372", "author": { "name": "sinanajani", "key": "sinanajani", "displayName": "Ani Sinanaj", "active": true, "timeZone": "America/Los_Angeles" }, "body": "If I remember correctly, I tried the blur event and it didn't resolve my issue. Probably improving Ti.Map would be necessary, nevertheless I think exposing `willclose` isn't a bad idea. It may be useful.", "updateAuthor": { "name": "sinanajani", "key": "sinanajani", "displayName": "Ani Sinanaj", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-06T07:20:27.000+0000", "updated": "2018-09-06T07:20:27.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }