{"action":"created","issue":{"url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1051","labels_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1051/labels{/name}","comments_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1051/comments","events_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1051/events","html_url":"https://github.com/AsyncHttpClient/async-http-client/issues/1051","id":120721170,"number":1051,"title":"Does the ResponderHandler in AsyncHttpResponseHandler may lead to memory leak？","user":{"login":"xiaol7","id":10302577,"avatar_url":"https://avatars.githubusercontent.com/u/10302577?v=3","gravatar_id":"","url":"https://api.github.com/users/xiaol7","html_url":"https://github.com/xiaol7","followers_url":"https://api.github.com/users/xiaol7/followers","following_url":"https://api.github.com/users/xiaol7/following{/other_user}","gists_url":"https://api.github.com/users/xiaol7/gists{/gist_id}","starred_url":"https://api.github.com/users/xiaol7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiaol7/subscriptions","organizations_url":"https://api.github.com/users/xiaol7/orgs","repos_url":"https://api.github.com/users/xiaol7/repos","events_url":"https://api.github.com/users/xiaol7/events{/privacy}","received_events_url":"https://api.github.com/users/xiaol7/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-07T08:14:09Z","updated_at":"2015-12-07T08:24:37Z","closed_at":"2015-12-07T08:24:37Z","body":"```java\r\nprivate static class ResponderHandler extends Handler {\r\n\r\n        private final AsyncHttpResponseHandler mResponder;\r\n\r\n        ResponderHandler(AsyncHttpResponseHandler mResponder, Looper looper) {\r\n            super(looper);\r\n            this.mResponder = mResponder;\r\n        }\r\n\r\n        @Override\r\n        public void handleMessage(Message msg) {\r\n            mResponder.handleMessage(msg);\r\n        }\r\n    }\r\n\r\n```\r\n\r\nI see you say \"Avoid leaks by using a non-anonymous handler class\" in the note of ResponderHandler. But there is also a reference of \"AsyncHttpResponseHandler \", i don't know\r\nthe differents of this way and anonymous inner class,why not use WeakReference,can you explain it? \r\nThank you."},"comment":{"url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/comments/162446626","html_url":"https://github.com/AsyncHttpClient/async-http-client/issues/1051#issuecomment-162446626","issue_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1051","id":162446626,"user":{"login":"slandelle","id":849197,"avatar_url":"https://avatars.githubusercontent.com/u/849197?v=3","gravatar_id":"","url":"https://api.github.com/users/slandelle","html_url":"https://github.com/slandelle","followers_url":"https://api.github.com/users/slandelle/followers","following_url":"https://api.github.com/users/slandelle/following{/other_user}","gists_url":"https://api.github.com/users/slandelle/gists{/gist_id}","starred_url":"https://api.github.com/users/slandelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slandelle/subscriptions","organizations_url":"https://api.github.com/users/slandelle/orgs","repos_url":"https://api.github.com/users/slandelle/repos","events_url":"https://api.github.com/users/slandelle/events{/privacy}","received_events_url":"https://api.github.com/users/slandelle/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T08:24:37Z","updated_at":"2015-12-07T08:24:37Z","body":"Stupid loopj project: https://github.com/loopj/android-async-http/issues/876"}}