{"action":"created","comment":{"url":"https://api.github.com/repos/xtermjs/xterm.js/pulls/comments/197894628","pull_request_review_id":131727597,"id":197894628,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Nzg5NDYyOA==","diff_hunk":"@@ -72,29 +71,28 @@ export class AccessibilityManager implements IDisposable {\n \n     this._terminal.element.insertAdjacentElement('afterbegin', this._accessibilityTreeRoot);\n \n-    this._disposables.push(this._renderRowsDebouncer);\n-    this._disposables.push(this._terminal.addDisposableListener('resize', data => this._onResize(data.cols, data.rows)));\n-    this._disposables.push(this._terminal.addDisposableListener('refresh', data => this._refreshRows(data.start, data.end)));\n-    this._disposables.push(this._terminal.addDisposableListener('scroll', data => this._refreshRows()));\n+    this.register(this._renderRowsDebouncer);","path":"src/AccessibilityManager.ts","position":47,"original_position":45,"commit_id":"8ae8705ae6c3a04719a21facff3b35e11176feaa","original_commit_id":"4d52cd3c66c2b8167161efe1857032b57f8cfdcc","user":{"login":"Tyriar","id":2193314,"node_id":"MDQ6VXNlcjIxOTMzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2193314?v=4","gravatar_id":"","url":"https://api.github.com/users/Tyriar","html_url":"https://github.com/Tyriar","followers_url":"https://api.github.com/users/Tyriar/followers","following_url":"https://api.github.com/users/Tyriar/following{/other_user}","gists_url":"https://api.github.com/users/Tyriar/gists{/gist_id}","starred_url":"https://api.github.com/users/Tyriar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tyriar/subscriptions","organizations_url":"https://api.github.com/users/Tyriar/orgs","repos_url":"https://api.github.com/users/Tyriar/repos","events_url":"https://api.github.com/users/Tyriar/events{/privacy}","received_events_url":"https://api.github.com/users/Tyriar/received_events","type":"User","site_admin":false},"body":"I looked into this and I don't think we can do it. For starters decorators are experimental, I switched it on and tried to get it working but it seemed to be acting not as I expected. Maybe we can do this in the future?","created_at":"2018-06-25T18:22:23Z","updated_at":"2018-06-25T18:22:23Z","html_url":"https://github.com/xtermjs/xterm.js/pull/1525#discussion_r197894628","pull_request_url":"https://api.github.com/repos/xtermjs/xterm.js/pulls/1525","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/xtermjs/xterm.js/pulls/comments/197894628"},"html":{"href":"https://github.com/xtermjs/xterm.js/pull/1525#discussion_r197894628"},"pull_request":{"href":"https://api.github.com/repos/xtermjs/xterm.js/pulls/1525"}},"in_reply_to_id":197020177},"pull_request":{"url":"https://api.github.com/repos/xtermjs/xterm.js/pulls/1525","id":196327333,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2MzI3MzMz","html_url":"https://github.com/xtermjs/xterm.js/pull/1525","diff_url":"https://github.com/xtermjs/xterm.js/pull/1525.diff","patch_url":"https://github.com/xtermjs/xterm.js/pull/1525.patch","issue_url":"https://api.github.com/repos/xtermjs/xterm.js/issues/1525","number":1525,"state":"open","locked":false,"title":"Ensure all references are released when Terminal.dispose is called","user":{"login":"Tyriar","id":2193314,"node_id":"MDQ6VXNlcjIxOTMzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2193314?v=4","gravatar_id":"","url":"https://api.github.com/users/Tyriar","html_url":"https://github.com/Tyriar","followers_url":"https://api.github.com/users/Tyriar/followers","following_url":"https://api.github.com/users/Tyriar/following{/other_user}","gists_url":"https://api.github.com/users/Tyriar/gists{/gist_id}","starred_url":"https://api.github.com/users/Tyriar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tyriar/subscriptions","organizations_url":"https://api.github.com/users/Tyriar/orgs","repos_url":"https://api.github.com/users/Tyriar/repos","events_url":"https://api.github.com/users/Tyriar/events{/privacy}","received_events_url":"https://api.github.com/users/Tyriar/received_events","type":"User","site_admin":false},"body":"This PR adds the following:\r\n\r\n- A new abstract class `Disposable` that is extended by a number of classes and provides a `register` function to register disposables and a `dispose` function which disposes them\r\n- Moves `util/Dom.ts` to `ui/Lifecycle.ts`\r\n- Registered disposables for all DOM event and EventEmitter listeners (excluding some mouse ones which need some more work)\r\n- Added a dispose terminal button to the bottom of the demo for easier testing of leaked references\r\n\r\nAfter these changes, when a heap snapshot is taken it will no longer show `Terminal` in the heap. The following was taken after filling the buffer and disposing the terminal:\r\n\r\n<img width=\"570\" alt=\"screen shot 2018-06-21 at 1 32 55 pm\" src=\"https://user-images.githubusercontent.com/2193314/41696491-ae3c9df2-7557-11e8-992e-80c3e66b99e6.png\">\r\n\r\nThis is what it looked like before (with demo and internal Terminal references holding onto the `Terminal`):\r\n\r\n<img width=\"995\" alt=\"screen shot 2018-06-21 at 1 33 57 pm\" src=\"https://user-images.githubusercontent.com/2193314/41696534-de8ab5fc-7557-11e8-8ca1-71e7af71b355.png\">\r\n\r\nFixes #1518","created_at":"2018-06-21T03:35:24Z","updated_at":"2018-06-25T18:22:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f3c2a6be0d10c09f2161ab5d346b74529a5f851b","assignee":{"login":"Tyriar","id":2193314,"node_id":"MDQ6VXNlcjIxOTMzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2193314?v=4","gravatar_id":"","url":"https://api.github.com/users/Tyriar","html_url":"https://github.com/Tyriar","followers_url":"https://api.github.com/users/Tyriar/followers","following_url":"https://api.github.com/users/Tyriar/following{/other_user}","gists_url":"https://api.github.com/users/Tyriar/gists{/gist_id}","starred_url":"https://api.github.com/users/Tyriar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tyriar/subscriptions","organizations_url":"https://api.github.com/users/Tyriar/orgs","repos_url":"https://api.github.com/users/Tyriar/repos","events_url":"https://api.github.com/users/Tyriar/events{/privacy}","received_events_url":"https://api.github.com/users/Tyriar/received_events","type":"User","site_admin":false},"assignees":[{"login":"Tyriar","id":2193314,"node_id":"MDQ6VXNlcjIxOTMzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2193314?v=4","gravatar_id":"","url":"https://api.github.com/users/Tyriar","html_url":"https://github.com/Tyriar","followers_url":"https://api.github.com/users/Tyriar/followers","following_url":"https://api.github.com/users/Tyriar/following{/other_user}","gists_url":"https://api.github.com/users/Tyriar/gists{/gist_id}","starred_url":"https://api.github.com/users/Tyriar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tyriar/subscriptions","organizations_url":"https://api.github.com/users/Tyriar/orgs","repos_url":"https://api.github.com/users/Tyriar/repos","events_url":"https://api.github.com/users/Tyriar/events{/privacy}","received_events_url":"https://api.github.com/users/Tyriar/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/xtermjs/xterm.js/milestones/26","html_url":"https://github.com/xtermjs/xterm.js/milestone/26","labels_url":"https://api.github.com/repos/xtermjs/xterm.js/milestones/26/labels","id":3281699,"node_id":"MDk6TWlsZXN0b25lMzI4MTY5OQ==","number":26,"title":"3.5.0","description":"","creator":{"login":"Tyriar","id":2193314,"node_id":"MDQ6VXNlcjIxOTMzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2193314?v=4","gravatar_id":"","url":"https://api.github.com/users/Tyriar","html_url":"https://github.com/Tyriar","followers_url":"https://api.github.com/users/Tyriar/followers","following_url":"https://api.github.com/users/Tyriar/following{/other_user}","gists_url":"https://api.github.com/users/Tyriar/gists{/gist_id}","starred_url":"https://api.github.com/users/Tyriar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tyriar/subscriptions","organizations_url":"https://api.github.com/users/Tyriar/orgs","repos_url":"https://api.github.com/users/Tyriar/repos","events_url":"https://api.github.com/users/Tyriar/events{/privacy}","received_events_url":"https://api.github.com/users/Tyriar/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":42,"state":"open","created_at":"2018-04-19T18:31:21Z","updated_at":"2018-06-21T21:37:04Z","due_on":"2018-07-06T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/xtermjs/xterm.js/pulls/1525/commits","review_comments_url":"https://api.github.com/repos/xtermjs/xterm.js/pulls/1525/comments","review_comment_url":"https://api.github.com/repos/xtermjs/xterm.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xtermjs/xterm.js/issues/1525/comments","statuses_url":"https://api.github.com/repos/xtermjs/xterm.js/statuses/8ae8705ae6c3a04719a21facff3b35e11176feaa","head":{"label":"Tyriar:1518_memory","ref":"1518_memory","sha":"8ae8705ae6c3a04719a21facff3b35e11176feaa","user":{"login":"Tyriar","id":2193314,"node_id":"MDQ6VXNlcjIxOTMzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2193314?v=4","gravatar_id":"","url":"https://api.github.com/users/Tyriar","html_url":"https://github.com/Tyriar","followers_url":"https://api.github.com/users/Tyriar/followers","following_url":"https://api.github.com/users/Tyriar/following{/other_user}","gists_url":"https://api.github.com/users/Tyriar/gists{/gist_id}","starred_url":"https://api.github.com/users/Tyriar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tyriar/subscriptions","organizations_url":"https://api.github.com/users/Tyriar/orgs","repos_url":"https://api.github.com/users/Tyriar/repos","events_url":"https://api.github.com/users/Tyriar/events{/privacy}","received_events_url":"https://api.github.com/users/Tyriar/received_events","type":"User","site_admin":false},"repo":{"id":60249805,"node_id":"MDEwOlJlcG9zaXRvcnk2MDI0OTgwNQ==","name":"xterm.js","full_name":"Tyriar/xterm.js","owner":{"login":"Tyriar","id":2193314,"node_id":"MDQ6VXNlcjIxOTMzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2193314?v=4","gravatar_id":"","url":"https://api.github.com/users/Tyriar","html_url":"https://github.com/Tyriar","followers_url":"https://api.github.com/users/Tyriar/followers","following_url":"https://api.github.com/users/Tyriar/following{/other_user}","gists_url":"https://api.github.com/users/Tyriar/gists{/gist_id}","starred_url":"https://api.github.com/users/Tyriar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tyriar/subscriptions","organizations_url":"https://api.github.com/users/Tyriar/orgs","repos_url":"https://api.github.com/users/Tyriar/repos","events_url":"https://api.github.com/users/Tyriar/events{/privacy}","received_events_url":"https://api.github.com/users/Tyriar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Tyriar/xterm.js","description":"Full xterm terminal, in your browser","fork":true,"url":"https://api.github.com/repos/Tyriar/xterm.js","forks_url":"https://api.github.com/repos/Tyriar/xterm.js/forks","keys_url":"https://api.github.com/repos/Tyriar/xterm.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tyriar/xterm.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tyriar/xterm.js/teams","hooks_url":"https://api.github.com/repos/Tyriar/xterm.js/hooks","issue_events_url":"https://api.github.com/repos/Tyriar/xterm.js/issues/events{/number}","events_url":"https://api.github.com/repos/Tyriar/xterm.js/events","assignees_url":"https://api.github.com/repos/Tyriar/xterm.js/assignees{/user}","branches_url":"https://api.github.com/repos/Tyriar/xterm.js/branches{/branch}","tags_url":"https://api.github.com/repos/Tyriar/xterm.js/tags","blobs_url":"https://api.github.com/repos/Tyriar/xterm.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tyriar/xterm.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tyriar/xterm.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tyriar/xterm.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tyriar/xterm.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Tyriar/xterm.js/languages","stargazers_url":"https://api.github.com/repos/Tyriar/xterm.js/stargazers","contributors_url":"https://api.github.com/repos/Tyriar/xterm.js/contributors","subscribers_url":"https://api.github.com/repos/Tyriar/xterm.js/subscribers","subscription_url":"https://api.github.com/repos/Tyriar/xterm.js/subscription","commits_url":"https://api.github.com/repos/Tyriar/xterm.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tyriar/xterm.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tyriar/xterm.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tyriar/xterm.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tyriar/xterm.js/contents/{+path}","compare_url":"https://api.github.com/repos/Tyriar/xterm.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tyriar/xterm.js/merges","archive_url":"https://api.github.com/repos/Tyriar/xterm.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tyriar/xterm.js/downloads","issues_url":"https://api.github.com/repos/Tyriar/xterm.js/issues{/number}","pulls_url":"https://api.github.com/repos/Tyriar/xterm.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Tyriar/xterm.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Tyriar/xterm.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tyriar/xterm.js/labels{/name}","releases_url":"https://api.github.com/repos/Tyriar/xterm.js/releases{/id}","deployments_url":"https://api.github.com/repos/Tyriar/xterm.js/deployments","created_at":"2016-06-02T09:15:32Z","updated_at":"2018-06-25T18:20:30Z","pushed_at":"2018-06-25T18:21:06Z","git_url":"git://github.com/Tyriar/xterm.js.git","ssh_url":"git@github.com:Tyriar/xterm.js.git","clone_url":"https://github.com/Tyriar/xterm.js.git","svn_url":"https://github.com/Tyriar/xterm.js","homepage":"https://lair.io/sourcelair/xterm","size":6706,"stargazers_count":10,"watchers_count":10,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":10,"default_branch":"master"}},"base":{"label":"xtermjs:master","ref":"master","sha":"f9bc3c511b84fa43a3a7f4ad52688a8c7df44d3e","user":{"login":"xtermjs","id":11927490,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExOTI3NDkw","avatar_url":"https://avatars1.githubusercontent.com/u/11927490?v=4","gravatar_id":"","url":"https://api.github.com/users/xtermjs","html_url":"https://github.com/xtermjs","followers_url":"https://api.github.com/users/xtermjs/followers","following_url":"https://api.github.com/users/xtermjs/following{/other_user}","gists_url":"https://api.github.com/users/xtermjs/gists{/gist_id}","starred_url":"https://api.github.com/users/xtermjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtermjs/subscriptions","organizations_url":"https://api.github.com/users/xtermjs/orgs","repos_url":"https://api.github.com/users/xtermjs/repos","events_url":"https://api.github.com/users/xtermjs/events{/privacy}","received_events_url":"https://api.github.com/users/xtermjs/received_events","type":"Organization","site_admin":false},"repo":{"id":18068542,"node_id":"MDEwOlJlcG9zaXRvcnkxODA2ODU0Mg==","name":"xterm.js","full_name":"xtermjs/xterm.js","owner":{"login":"xtermjs","id":11927490,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExOTI3NDkw","avatar_url":"https://avatars1.githubusercontent.com/u/11927490?v=4","gravatar_id":"","url":"https://api.github.com/users/xtermjs","html_url":"https://github.com/xtermjs","followers_url":"https://api.github.com/users/xtermjs/followers","following_url":"https://api.github.com/users/xtermjs/following{/other_user}","gists_url":"https://api.github.com/users/xtermjs/gists{/gist_id}","starred_url":"https://api.github.com/users/xtermjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtermjs/subscriptions","organizations_url":"https://api.github.com/users/xtermjs/orgs","repos_url":"https://api.github.com/users/xtermjs/repos","events_url":"https://api.github.com/users/xtermjs/events{/privacy}","received_events_url":"https://api.github.com/users/xtermjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xtermjs/xterm.js","description":"A terminal for the web","fork":false,"url":"https://api.github.com/repos/xtermjs/xterm.js","forks_url":"https://api.github.com/repos/xtermjs/xterm.js/forks","keys_url":"https://api.github.com/repos/xtermjs/xterm.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xtermjs/xterm.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xtermjs/xterm.js/teams","hooks_url":"https://api.github.com/repos/xtermjs/xterm.js/hooks","issue_events_url":"https://api.github.com/repos/xtermjs/xterm.js/issues/events{/number}","events_url":"https://api.github.com/repos/xtermjs/xterm.js/events","assignees_url":"https://api.github.com/repos/xtermjs/xterm.js/assignees{/user}","branches_url":"https://api.github.com/repos/xtermjs/xterm.js/branches{/branch}","tags_url":"https://api.github.com/repos/xtermjs/xterm.js/tags","blobs_url":"https://api.github.com/repos/xtermjs/xterm.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xtermjs/xterm.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xtermjs/xterm.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/xtermjs/xterm.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xtermjs/xterm.js/statuses/{sha}","languages_url":"https://api.github.com/repos/xtermjs/xterm.js/languages","stargazers_url":"https://api.github.com/repos/xtermjs/xterm.js/stargazers","contributors_url":"https://api.github.com/repos/xtermjs/xterm.js/contributors","subscribers_url":"https://api.github.com/repos/xtermjs/xterm.js/subscribers","subscription_url":"https://api.github.com/repos/xtermjs/xterm.js/subscription","commits_url":"https://api.github.com/repos/xtermjs/xterm.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/xtermjs/xterm.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/xtermjs/xterm.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/xtermjs/xterm.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/xtermjs/xterm.js/contents/{+path}","compare_url":"https://api.github.com/repos/xtermjs/xterm.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xtermjs/xterm.js/merges","archive_url":"https://api.github.com/repos/xtermjs/xterm.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xtermjs/xterm.js/downloads","issues_url":"https://api.github.com/repos/xtermjs/xterm.js/issues{/number}","pulls_url":"https://api.github.com/repos/xtermjs/xterm.js/pulls{/number}","milestones_url":"https://api.github.com/repos/xtermjs/xterm.js/milestones{/number}","notifications_url":"https://api.github.com/repos/xtermjs/xterm.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xtermjs/xterm.js/labels{/name}","releases_url":"https://api.github.com/repos/xtermjs/xterm.js/releases{/id}","deployments_url":"https://api.github.com/repos/xtermjs/xterm.js/deployments","created_at":"2014-03-24T16:04:04Z","updated_at":"2018-06-25T14:52:53Z","pushed_at":"2018-06-25T18:21:07Z","git_url":"git://github.com/xtermjs/xterm.js.git","ssh_url":"git@github.com:xtermjs/xterm.js.git","clone_url":"https://github.com/xtermjs/xterm.js.git","svn_url":"https://github.com/xtermjs/xterm.js","homepage":"https://xtermjs.org/","size":5132,"stargazers_count":3997,"watchers_count":3997,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":432,"mirror_url":null,"archived":false,"open_issues_count":102,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":432,"open_issues":102,"watchers":3997,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xtermjs/xterm.js/pulls/1525"},"html":{"href":"https://github.com/xtermjs/xterm.js/pull/1525"},"issue":{"href":"https://api.github.com/repos/xtermjs/xterm.js/issues/1525"},"comments":{"href":"https://api.github.com/repos/xtermjs/xterm.js/issues/1525/comments"},"review_comments":{"href":"https://api.github.com/repos/xtermjs/xterm.js/pulls/1525/comments"},"review_comment":{"href":"https://api.github.com/repos/xtermjs/xterm.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xtermjs/xterm.js/pulls/1525/commits"},"statuses":{"href":"https://api.github.com/repos/xtermjs/xterm.js/statuses/8ae8705ae6c3a04719a21facff3b35e11176feaa"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"Tyriar"}}