{"action":"created","issue":{"url":"https://api.github.com/repos/dalelotts/angular-bootstrap-datetimepicker/issues/264","repository_url":"https://api.github.com/repos/dalelotts/angular-bootstrap-datetimepicker","labels_url":"https://api.github.com/repos/dalelotts/angular-bootstrap-datetimepicker/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/dalelotts/angular-bootstrap-datetimepicker/issues/264/comments","events_url":"https://api.github.com/repos/dalelotts/angular-bootstrap-datetimepicker/issues/264/events","html_url":"https://github.com/dalelotts/angular-bootstrap-datetimepicker/pull/264","id":127935848,"number":264,"title":"Fix leaking listeners and DOM elements.","user":{"login":"dumbNickname","id":10998994,"avatar_url":"https://avatars.githubusercontent.com/u/10998994?v=3","gravatar_id":"","url":"https://api.github.com/users/dumbNickname","html_url":"https://github.com/dumbNickname","followers_url":"https://api.github.com/users/dumbNickname/followers","following_url":"https://api.github.com/users/dumbNickname/following{/other_user}","gists_url":"https://api.github.com/users/dumbNickname/gists{/gist_id}","starred_url":"https://api.github.com/users/dumbNickname/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumbNickname/subscriptions","organizations_url":"https://api.github.com/users/dumbNickname/orgs","repos_url":"https://api.github.com/users/dumbNickname/repos","events_url":"https://api.github.com/users/dumbNickname/events{/privacy}","received_events_url":"https://api.github.com/users/dumbNickname/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dalelotts/angular-bootstrap-datetimepicker/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/dalelotts/angular-bootstrap-datetimepicker/labels/Help%20/%20PR%20wanted","name":"Help / PR wanted","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-21T14:29:53Z","updated_at":"2016-02-24T16:38:55Z","closed_at":"2016-01-31T19:14:22Z","pull_request":{"url":"https://api.github.com/repos/dalelotts/angular-bootstrap-datetimepicker/pulls/264","html_url":"https://github.com/dalelotts/angular-bootstrap-datetimepicker/pull/264","diff_url":"https://github.com/dalelotts/angular-bootstrap-datetimepicker/pull/264.diff","patch_url":"https://github.com/dalelotts/angular-bootstrap-datetimepicker/pull/264.patch"},"body":"Hey. \r\n\r\nThis is a brute force fix for leaking listeners and DOM elements. Currently scope parameter of link function is being passed via closure to listener function and to functions in data factory. As always in closures, this means that browser will keep whole context of the linking function, so here it will include element as well. It made proper garbage collection not possible (profiled on Chrome).\r\n\r\nIt can be fixed cleaner e.g. by using local variables in linking function and then passing those via closure or by restructuring the code a bit. Please excuse that I did not do it in the first place, but I do not know the project and had to quickly plug in this component. \r\n\r\nI am pushing this PR just to provide a quick fix - in case anybody else would like to get rid of performance issues. If you decide to solve the problem in another way, please just ignore this PR.\r\n\r\nCheers!\r\nBartek "},"comment":{"url":"https://api.github.com/repos/dalelotts/angular-bootstrap-datetimepicker/issues/comments/188343644","html_url":"https://github.com/dalelotts/angular-bootstrap-datetimepicker/pull/264#issuecomment-188343644","issue_url":"https://api.github.com/repos/dalelotts/angular-bootstrap-datetimepicker/issues/264","id":188343644,"user":{"login":"dumbNickname","id":10998994,"avatar_url":"https://avatars.githubusercontent.com/u/10998994?v=3","gravatar_id":"","url":"https://api.github.com/users/dumbNickname","html_url":"https://github.com/dumbNickname","followers_url":"https://api.github.com/users/dumbNickname/followers","following_url":"https://api.github.com/users/dumbNickname/following{/other_user}","gists_url":"https://api.github.com/users/dumbNickname/gists{/gist_id}","starred_url":"https://api.github.com/users/dumbNickname/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumbNickname/subscriptions","organizations_url":"https://api.github.com/users/dumbNickname/orgs","repos_url":"https://api.github.com/users/dumbNickname/repos","events_url":"https://api.github.com/users/dumbNickname/events{/privacy}","received_events_url":"https://api.github.com/users/dumbNickname/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T16:38:55Z","updated_at":"2016-02-24T16:38:55Z","body":"Forgot about this issue and somehow did not notice the notification about your reply ... sorry. I checked out of curiosity what is going on with the PR and then noticed that you replied. Is this issue still up to date? "}}