{"action":"created","issue":{"url":"https://api.github.com/repos/thibauts/node-upnp-mediarenderer-client/issues/16","labels_url":"https://api.github.com/repos/thibauts/node-upnp-mediarenderer-client/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/thibauts/node-upnp-mediarenderer-client/issues/16/comments","events_url":"https://api.github.com/repos/thibauts/node-upnp-mediarenderer-client/issues/16/events","html_url":"https://github.com/thibauts/node-upnp-mediarenderer-client/issues/16","id":83220923,"number":16,"title":".destroy(cb)","user":{"login":"jaruba","id":1777923,"avatar_url":"https://avatars.githubusercontent.com/u/1777923?v=3","gravatar_id":"","url":"https://api.github.com/users/jaruba","html_url":"https://github.com/jaruba","followers_url":"https://api.github.com/users/jaruba/followers","following_url":"https://api.github.com/users/jaruba/following{/other_user}","gists_url":"https://api.github.com/users/jaruba/gists{/gist_id}","starred_url":"https://api.github.com/users/jaruba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaruba/subscriptions","organizations_url":"https://api.github.com/users/jaruba/orgs","repos_url":"https://api.github.com/users/jaruba/repos","events_url":"https://api.github.com/users/jaruba/events{/privacy}","received_events_url":"https://api.github.com/users/jaruba/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-31T23:21:15Z","updated_at":"2015-06-01T22:36:13Z","closed_at":null,"body":"How about a method to efficiently destroy the ``node-upnp-mediarenderer-client`` instance?"},"comment":{"url":"https://api.github.com/repos/thibauts/node-upnp-mediarenderer-client/issues/comments/107737675","html_url":"https://github.com/thibauts/node-upnp-mediarenderer-client/issues/16#issuecomment-107737675","issue_url":"https://api.github.com/repos/thibauts/node-upnp-mediarenderer-client/issues/16","id":107737675,"user":{"login":"thibauts","id":2544184,"avatar_url":"https://avatars.githubusercontent.com/u/2544184?v=3","gravatar_id":"","url":"https://api.github.com/users/thibauts","html_url":"https://github.com/thibauts","followers_url":"https://api.github.com/users/thibauts/followers","following_url":"https://api.github.com/users/thibauts/following{/other_user}","gists_url":"https://api.github.com/users/thibauts/gists{/gist_id}","starred_url":"https://api.github.com/users/thibauts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thibauts/subscriptions","organizations_url":"https://api.github.com/users/thibauts/orgs","repos_url":"https://api.github.com/users/thibauts/repos","events_url":"https://api.github.com/users/thibauts/events{/privacy}","received_events_url":"https://api.github.com/users/thibauts/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T22:36:13Z","updated_at":"2015-06-01T22:36:13Z","body":"There shouldn't be any listeners hanging, or memory leak when you dereference the client, by design. You only have to remove the listeners you have registered and everything will go fine. Maybe a `close` method that calls `this.removeAllListeners` for all possibly registered events would make it. If you submit a PR in this respect I'll happily merge it."}}