{ "id": "169415", "key": "TIMOB-25075", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2018-08-02T09:56:12.000+0000", "created": "2017-08-07T12:39:08.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "memory", "v8" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-08-06T17:41:12.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "v8 supports optional notification \"LowMemoryNotification\". Call to this method causes proper garbage collection, so many object will be collected on both js and java sides.\r\n\r\nIn my experience \"IdleNotificationDeadline(now+0.1)\" is not enough to collect all objects and some times this could lead to huge memory leak (actually it is not leak, because memory in java heap will be freed after gc in v8, for example if I call js heap snapshot creation)\r\n\r\nI suggest, that we should add \"LowMemoryNotification\" call in case of:\r\n- Application.onLowMemory\r\n- Application.onTrimMemory\r\n\r\nAlso maybe:\r\n- in case OutOfMemoryError in classes, which already handles this exception\r\n- preventive check free heap size (Runtime.getRuntime().freeMemory()) and call when it is low.", "attachment": [ { "id": "62991", "filename": "0001-v8-LowMemoryNotification.patch", "author": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "created": "2017-08-07T12:13:05.000+0000", "size": 4913, "mimeType": "text/x-patch" } ], "flagged": false, "summary": "Android. v8 LowMemoryNotification", "creator": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "subtasks": [], "reporter": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "environment": "Titanium SDK: 6.1.2", "closedSprints": [ { "id": 1058, "state": "closed", "name": "2018 Sprint 16 SDK", "startDate": "2018-07-29T22:26:06.486Z", "endDate": "2018-08-12T22:26:00.000Z", "completeDate": "2018-08-13T17:38:16.757Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "439691", "author": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "body": "In TIMOB-26242 implemented call \"LowMemoryNotification\".\r\nThis issue could be closed.", "updateAuthor": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "created": "2018-08-02T09:18:00.000+0000", "updated": "2018-08-02T09:18:00.000+0000" }, { "id": "439692", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks for your ongoing eagle-eyes! Resolving as {{Duplicate}}.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-08-02T09:56:12.000+0000", "updated": "2018-08-02T09:56:12.000+0000" }, { "id": "440020", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as a duplicate. If this is in error, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:41:12.000+0000", "updated": "2018-08-06T17:41:12.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }