{"action":"created","issue":{"url":"https://api.github.com/repos/vector-im/vector-android/issues/754","repository_url":"https://api.github.com/repos/vector-im/vector-android","labels_url":"https://api.github.com/repos/vector-im/vector-android/issues/754/labels{/name}","comments_url":"https://api.github.com/repos/vector-im/vector-android/issues/754/comments","events_url":"https://api.github.com/repos/vector-im/vector-android/issues/754/events","html_url":"https://github.com/vector-im/vector-android/issues/754","id":191767467,"number":754,"title":"Memory leak when opening a room","user":{"login":"Matrixcoffee","id":21172059,"avatar_url":"https://avatars.githubusercontent.com/u/21172059?v=3","gravatar_id":"","url":"https://api.github.com/users/Matrixcoffee","html_url":"https://github.com/Matrixcoffee","followers_url":"https://api.github.com/users/Matrixcoffee/followers","following_url":"https://api.github.com/users/Matrixcoffee/following{/other_user}","gists_url":"https://api.github.com/users/Matrixcoffee/gists{/gist_id}","starred_url":"https://api.github.com/users/Matrixcoffee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Matrixcoffee/subscriptions","organizations_url":"https://api.github.com/users/Matrixcoffee/orgs","repos_url":"https://api.github.com/users/Matrixcoffee/repos","events_url":"https://api.github.com/users/Matrixcoffee/events{/privacy}","received_events_url":"https://api.github.com/users/Matrixcoffee/received_events","type":"User","site_admin":false},"labels":[{"id":300900751,"url":"https://api.github.com/repos/vector-im/vector-android/labels/bug","name":"bug","color":"fc2929","default":true},{"id":334372676,"url":"https://api.github.com/repos/vector-im/vector-android/labels/P2","name":"P2","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-25T21:37:41Z","updated_at":"2016-11-27T09:47:09Z","closed_at":null,"body":"Opening a room from the recents list causes Riot's memory footprint to permanently increase by a small amount. Going back to the recents list does not release the memory, and opening the *same* room again causes another increase. Repeatedly opening the same room will quickly run up the memory, until the app crashes.\r\n\r\nTo demonstrate, this is what happens when I repeatedly tap on \"Matrix HQ\" -> back -> \"Matrix HQ\" -> back -> \"Matrix HQ\" -> back -> \"Matrix HQ\" -> back -> \"Matrix HQ\" -> back -> ...\r\n\r\n![mmpwqjplludubwsivvxlichn](https://cloud.githubusercontent.com/assets/21172059/20635468/462cfd80-b355-11e6-8ad4-2bc9dd2f05d6.jpeg)\r\n\r\nAs you can see by the blue line, it took me about four minutes to get Riot close to the point of crashing. (It usually crashes at about 30% of memory on my phone.)\r\n\r\nFor contrast, this is me using Riot normally:\r\n\r\n![dlfnvupbvktehgfaarjncuwf](https://cloud.githubusercontent.com/assets/21172059/20635507/b61b920a-b355-11e6-8243-d290ca94281a.jpeg)\r\n\r\nI realize my phone has limited memory. However, having studies the app's behavour, I believe it should be able to run Riot well and indefinitely if all leaks like these are fixed."},"comment":{"url":"https://api.github.com/repos/vector-im/vector-android/issues/comments/263112712","html_url":"https://github.com/vector-im/vector-android/issues/754#issuecomment-263112712","issue_url":"https://api.github.com/repos/vector-im/vector-android/issues/754","id":263112712,"user":{"login":"ylecollen","id":8971031,"avatar_url":"https://avatars.githubusercontent.com/u/8971031?v=3","gravatar_id":"","url":"https://api.github.com/users/ylecollen","html_url":"https://github.com/ylecollen","followers_url":"https://api.github.com/users/ylecollen/followers","following_url":"https://api.github.com/users/ylecollen/following{/other_user}","gists_url":"https://api.github.com/users/ylecollen/gists{/gist_id}","starred_url":"https://api.github.com/users/ylecollen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ylecollen/subscriptions","organizations_url":"https://api.github.com/users/ylecollen/orgs","repos_url":"https://api.github.com/users/ylecollen/repos","events_url":"https://api.github.com/users/ylecollen/events{/privacy}","received_events_url":"https://api.github.com/users/ylecollen/received_events","type":"User","site_admin":false},"created_at":"2016-11-27T09:47:09Z","updated_at":"2016-11-27T09:47:09Z","body":"Not sure it is a memory leak.\r\nJava might not trigger a GC.\r\nWe don't manage the objects releases like in C/C++ (with maloc/ free)\r\nWe have to force the GC to check it"}}
{"actor":{"display_login":"ylecollen"}}