{"action":"created","issue":{"url":"https://api.github.com/repos/fabiendevos/nanotasks/issues/1","labels_url":"https://api.github.com/repos/fabiendevos/nanotasks/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/fabiendevos/nanotasks/issues/1/comments","events_url":"https://api.github.com/repos/fabiendevos/nanotasks/issues/1/events","html_url":"https://github.com/fabiendevos/nanotasks/issues/1","id":56458218,"number":1,"title":"Sample shows wrong way to create the Task by instantiating anonymous classes","user":{"login":"quanturium","id":946778,"avatar_url":"https://avatars.githubusercontent.com/u/946778?v=3","gravatar_id":"","url":"https://api.github.com/users/quanturium","html_url":"https://github.com/quanturium","followers_url":"https://api.github.com/users/quanturium/followers","following_url":"https://api.github.com/users/quanturium/following{/other_user}","gists_url":"https://api.github.com/users/quanturium/gists{/gist_id}","starred_url":"https://api.github.com/users/quanturium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quanturium/subscriptions","organizations_url":"https://api.github.com/users/quanturium/orgs","repos_url":"https://api.github.com/users/quanturium/repos","events_url":"https://api.github.com/users/quanturium/events{/privacy}","received_events_url":"https://api.github.com/users/quanturium/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-03T23:55:34Z","updated_at":"2015-02-27T23:34:37Z","closed_at":null,"body":"Sample shows wrong way to create a BackgroundTask by instantiating anonymous classes and therefore keeping a reference to the activity / leaking it."},"comment":{"url":"https://api.github.com/repos/fabiendevos/nanotasks/issues/comments/76492878","html_url":"https://github.com/fabiendevos/nanotasks/issues/1#issuecomment-76492878","issue_url":"https://api.github.com/repos/fabiendevos/nanotasks/issues/1","id":76492878,"user":{"login":"fabiendevos","id":745761,"avatar_url":"https://avatars.githubusercontent.com/u/745761?v=3","gravatar_id":"","url":"https://api.github.com/users/fabiendevos","html_url":"https://github.com/fabiendevos","followers_url":"https://api.github.com/users/fabiendevos/followers","following_url":"https://api.github.com/users/fabiendevos/following{/other_user}","gists_url":"https://api.github.com/users/fabiendevos/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiendevos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiendevos/subscriptions","organizations_url":"https://api.github.com/users/fabiendevos/orgs","repos_url":"https://api.github.com/users/fabiendevos/repos","events_url":"https://api.github.com/users/fabiendevos/events{/privacy}","received_events_url":"https://api.github.com/users/fabiendevos/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T23:34:37Z","updated_at":"2015-02-27T23:34:37Z","body":"@sergeyzenchenko @ChrisMCMine etc.\r\nYou're totally right. It was also initially conceived to be purely an asynctask wrapper and just improve the asynctask API (I didn't want to have to subclass, and I wante onSuccess/onError callbacks).\r\n\r\nI'm working on solving this issue. One option is to clean-up the listeners with a LifeCycleCallback. This is a bit tricky to implement right though. I should have something ready soon. This is probably going to be NanoTask v2.\r\n\r\nThanks for the feedback."}}