{"action":"closed","issue":{"url":"https://api.github.com/repos/patloew/countries/issues/1","repository_url":"https://api.github.com/repos/patloew/countries","labels_url":"https://api.github.com/repos/patloew/countries/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/patloew/countries/issues/1/comments","events_url":"https://api.github.com/repos/patloew/countries/issues/1/events","html_url":"https://github.com/patloew/countries/issues/1","id":167484708,"number":1,"title":"Realm instances properly closed?","user":{"login":"tindli","id":6454552,"avatar_url":"https://avatars.githubusercontent.com/u/6454552?v=3","gravatar_id":"","url":"https://api.github.com/users/tindli","html_url":"https://github.com/tindli","followers_url":"https://api.github.com/users/tindli/followers","following_url":"https://api.github.com/users/tindli/following{/other_user}","gists_url":"https://api.github.com/users/tindli/gists{/gist_id}","starred_url":"https://api.github.com/users/tindli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tindli/subscriptions","organizations_url":"https://api.github.com/users/tindli/orgs","repos_url":"https://api.github.com/users/tindli/repos","events_url":"https://api.github.com/users/tindli/events{/privacy}","received_events_url":"https://api.github.com/users/tindli/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-25T22:55:16Z","updated_at":"2016-07-26T15:44:36Z","closed_at":"2016-07-26T15:44:36Z","body":"Awesome project - thanks a lot for the demo;\r\n\r\nOne minor issue though:\r\n\r\nI found that realm instances created here:\r\nhttps://github.com/patloew/countries/blob/ffa6b78199bc51324b364267036465d3fbfc68f9/app/src/main/java/com/patloew/countries/data/local/CountryRepoImpl.java#L45\r\n\r\n...are never closed. Either I miss an important point here or a memory leak is created\r\nwhen the backup store is queried... (`Realm.getInstance()` Is called on every query...)\r\n\r\nI am not sure if this is intended... what do I miss?\r\nIn activities, the Realm is properly closed within `onDestroy()`... so no problem there."}}
{"actor":{"display_login":"patloew"}}