{"action":"created","issue":{"url":"https://api.github.com/repos/hammerjs/hammer.js/issues/878","labels_url":"https://api.github.com/repos/hammerjs/hammer.js/issues/878/labels{/name}","comments_url":"https://api.github.com/repos/hammerjs/hammer.js/issues/878/comments","events_url":"https://api.github.com/repos/hammerjs/hammer.js/issues/878/events","html_url":"https://github.com/hammerjs/hammer.js/issues/878","id":118763572,"number":878,"title":"Memory Leak or Usage Problem, not sure","user":{"login":"garygriswold","id":610300,"avatar_url":"https://avatars.githubusercontent.com/u/610300?v=3","gravatar_id":"","url":"https://api.github.com/users/garygriswold","html_url":"https://github.com/garygriswold","followers_url":"https://api.github.com/users/garygriswold/followers","following_url":"https://api.github.com/users/garygriswold/following{/other_user}","gists_url":"https://api.github.com/users/garygriswold/gists{/gist_id}","starred_url":"https://api.github.com/users/garygriswold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garygriswold/subscriptions","organizations_url":"https://api.github.com/users/garygriswold/orgs","repos_url":"https://api.github.com/users/garygriswold/repos","events_url":"https://api.github.com/users/garygriswold/events{/privacy}","received_events_url":"https://api.github.com/users/garygriswold/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hammerjs/hammer.js/labels/Support","name":"Support","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-25T05:24:10Z","updated_at":"2015-12-07T15:15:06Z","closed_at":"2015-12-07T15:15:06Z","body":"I have an application that is creating and destroying tappable elements frequently, and I am seeing continual memory growth when I create and destroy hundreds of elements which are all tappable.  Is there something I am doing wrong, or is this a bug?  The following is how I create the listeners.\r\n\r\n     var touchableNode = new Hammer(domNode);\r\n     touchableNode.on('tap', function(event) {\r\n           ....\r\n     }"},"comment":{"url":"https://api.github.com/repos/hammerjs/hammer.js/issues/comments/162553199","html_url":"https://github.com/hammerjs/hammer.js/issues/878#issuecomment-162553199","issue_url":"https://api.github.com/repos/hammerjs/hammer.js/issues/878","id":162553199,"user":{"login":"runspired","id":650309,"avatar_url":"https://avatars.githubusercontent.com/u/650309?v=3","gravatar_id":"","url":"https://api.github.com/users/runspired","html_url":"https://github.com/runspired","followers_url":"https://api.github.com/users/runspired/followers","following_url":"https://api.github.com/users/runspired/following{/other_user}","gists_url":"https://api.github.com/users/runspired/gists{/gist_id}","starred_url":"https://api.github.com/users/runspired/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runspired/subscriptions","organizations_url":"https://api.github.com/users/runspired/orgs","repos_url":"https://api.github.com/users/runspired/repos","events_url":"https://api.github.com/users/runspired/events{/privacy}","received_events_url":"https://api.github.com/users/runspired/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T15:15:06Z","updated_at":"2015-12-07T15:15:06Z","body":"@garygriswold \r\n\r\n>  since removing the root DOM node of a tree releases DOM objects from memory just fine with no additional processing\r\n\r\nThat's not actually true.  Removing the root DOM node only removes itself and it's children if nothing retains them in memory.  Event listeners and variables that have references to nodes in that tree will cause them to be retained.  Call destroy on the Hammer instance, and null it out for good measure and you shouldn't have a memory retention issue anymore."}}