{"action":"closed","issue":{"url":"https://api.github.com/repos/mjneil/CruftEngine/issues/9","repository_url":"https://api.github.com/repos/mjneil/CruftEngine","labels_url":"https://api.github.com/repos/mjneil/CruftEngine/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/mjneil/CruftEngine/issues/9/comments","events_url":"https://api.github.com/repos/mjneil/CruftEngine/issues/9/events","html_url":"https://github.com/mjneil/CruftEngine/issues/9","id":136117938,"number":9,"title":"Adjust Pointer class","user":{"login":"Squeakrats","id":2876859,"avatar_url":"https://avatars.githubusercontent.com/u/2876859?v=3","gravatar_id":"","url":"https://api.github.com/users/Squeakrats","html_url":"https://github.com/Squeakrats","followers_url":"https://api.github.com/users/Squeakrats/followers","following_url":"https://api.github.com/users/Squeakrats/following{/other_user}","gists_url":"https://api.github.com/users/Squeakrats/gists{/gist_id}","starred_url":"https://api.github.com/users/Squeakrats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Squeakrats/subscriptions","organizations_url":"https://api.github.com/users/Squeakrats/orgs","repos_url":"https://api.github.com/users/Squeakrats/repos","events_url":"https://api.github.com/users/Squeakrats/events{/privacy}","received_events_url":"https://api.github.com/users/Squeakrats/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mjneil/CruftEngine/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-24T16:46:58Z","updated_at":"2016-02-29T15:37:51Z","closed_at":"2016-02-29T15:37:51Z","body":"Currently memory listens for an actor destroy event and removes it from mem \r\n\r\nie actor.on(\"destroy\", /*dostuff*/);\r\nwhat if we simply required deletions to just go through a pointer?\r\nie actrptr.destroy()? //calls actor.destroy and removes from mem. \r\n\r\nBenefits : \r\nMemory doesn't need to add a listener to every single destroy event.\r\npeople should be using pointers anyway? and it's sort of counter-intuitive that calling\r\ndestroy on an entity handles destroying references to it from the entire game.   \r\nCons : \r\nneed a pointer reference to destroy an actor \r\n(however actor.toPointer() is implemented so it's not that hard) \r\nactor.toPointer().destroy()\r\n\r\n\r\n\r\n"}}