{"action":"closed","issue":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1523","labels_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1523/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1523/comments","events_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1523/events","html_url":"https://github.com/angular-ui/angular-google-maps/issues/1523","id":107491183,"number":1523,"title":"Memory leak when updating markers","user":{"login":"spyridonas","id":4473825,"avatar_url":"https://avatars.githubusercontent.com/u/4473825?v=3","gravatar_id":"","url":"https://api.github.com/users/spyridonas","html_url":"https://github.com/spyridonas","followers_url":"https://api.github.com/users/spyridonas/followers","following_url":"https://api.github.com/users/spyridonas/following{/other_user}","gists_url":"https://api.github.com/users/spyridonas/gists{/gist_id}","starred_url":"https://api.github.com/users/spyridonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spyridonas/subscriptions","organizations_url":"https://api.github.com/users/spyridonas/orgs","repos_url":"https://api.github.com/users/spyridonas/repos","events_url":"https://api.github.com/users/spyridonas/events{/privacy}","received_events_url":"https://api.github.com/users/spyridonas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/labels/duplicate","name":"duplicate","color":"cccccc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-21T11:22:40Z","updated_at":"2015-09-21T23:07:36Z","closed_at":"2015-09-21T23:07:36Z","body":"I have 3 markers on my page and i update them every second. Before i insert them on the map i create an array with all the properties and an info window but i don't set a click handler, it automatically appears when i click. Now the problem is that every time i update the array and re-insert it to the scope, a new $scope object is created every time , and that's leads to memory leak. How can i destroy/unbind the previous $scope.markers ? i tried markers.$destroy() but it didn't work. I am using version 2.2.1"}}