{"action":"created","issue":{"url":"https://api.github.com/repos/square/picasso/issues/1044","labels_url":"https://api.github.com/repos/square/picasso/issues/1044/labels{/name}","comments_url":"https://api.github.com/repos/square/picasso/issues/1044/comments","events_url":"https://api.github.com/repos/square/picasso/issues/1044/events","html_url":"https://github.com/square/picasso/issues/1044","id":83052603,"number":1044,"title":"Picasso leaks context even though cancel is called","user":{"login":"mblcdr","id":3671190,"avatar_url":"https://avatars.githubusercontent.com/u/3671190?v=3","gravatar_id":"","url":"https://api.github.com/users/mblcdr","html_url":"https://github.com/mblcdr","followers_url":"https://api.github.com/users/mblcdr/followers","following_url":"https://api.github.com/users/mblcdr/following{/other_user}","gists_url":"https://api.github.com/users/mblcdr/gists{/gist_id}","starred_url":"https://api.github.com/users/mblcdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mblcdr/subscriptions","organizations_url":"https://api.github.com/users/mblcdr/orgs","repos_url":"https://api.github.com/users/mblcdr/repos","events_url":"https://api.github.com/users/mblcdr/events{/privacy}","received_events_url":"https://api.github.com/users/mblcdr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-05-31T09:41:19Z","updated_at":"2015-06-01T23:06:21Z","closed_at":null,"body":"I load my photo using:\r\n```Java\r\nPicasso.with(this).load(imageUrl)\r\n                .tag(PhotoActivity.class)\r\n                .resize(w, h)\r\n                .into(photo, new Callback() {\r\n                         @Override\r\n                         public void onSuccess() {\r\n                              //Some method calls here\r\n                         }\r\n\r\n                         @Override\r\n                         public void onError() {}\r\n                });\r\n```\r\nAnd I cancel this request in ```onStop()``` method using this line of code:\r\n```Java\r\nPicasso.with(this).cancelTag(PhotoActivity.class);\r\n```\r\n\r\nYet I get this log from leak canary:\r\n\r\n    * com.example.app.activity.PhotoActivity has leaked:\r\n    * GC ROOT thread com.squareup.picasso.Utils$PicassoThread.<Java Local> (named 'Picasso-Idle')\r\n    * references java.util.concurrent.PriorityBlockingQueue.queue\r\n    * references array java.lang.Object[].[0]\r\n    * references com.squareup.picasso.PicassoExecutorService$PicassoFutureTask.hunter\r\n    * references com.squareup.picasso.BitmapHunter.action\r\n    * references com.squareup.picasso.ImageViewAction.callback\r\n    * references com.example.app.activity.PhotoActivity$1.this$0 (anonymous class implements com.squareup.picasso.Callback)\r\n    * leaks com.example.app.activity.PhotoActivity instance\r\n    * Reference Key: 0a9592c7-a4b5-4ff0-adf9-d3fa9984a71a\r\n    * Device: Sony Sony C2105 C2105_1271-3303\r\n    * Android Version: 4.2.2 API: 17\r\n    * Durations: watch=5006ms, gc=181ms, heap dump=808ms, analysis=24507ms"},"comment":{"url":"https://api.github.com/repos/square/picasso/issues/comments/107742483","html_url":"https://github.com/square/picasso/issues/1044#issuecomment-107742483","issue_url":"https://api.github.com/repos/square/picasso/issues/1044","id":107742483,"user":{"login":"mblcdr","id":3671190,"avatar_url":"https://avatars.githubusercontent.com/u/3671190?v=3","gravatar_id":"","url":"https://api.github.com/users/mblcdr","html_url":"https://github.com/mblcdr","followers_url":"https://api.github.com/users/mblcdr/followers","following_url":"https://api.github.com/users/mblcdr/following{/other_user}","gists_url":"https://api.github.com/users/mblcdr/gists{/gist_id}","starred_url":"https://api.github.com/users/mblcdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mblcdr/subscriptions","organizations_url":"https://api.github.com/users/mblcdr/orgs","repos_url":"https://api.github.com/users/mblcdr/repos","events_url":"https://api.github.com/users/mblcdr/events{/privacy}","received_events_url":"https://api.github.com/users/mblcdr/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T23:06:21Z","updated_at":"2015-06-01T23:06:21Z","body":"In my app, there's no calling finish() in onCreate(). But the suspicion concerning the onStop() method not being called is valid. I will try to move the cancel() call to onDestroy() method and see if the leak is gone in my app.\r\n\r\nAnd about that unparseable leak warning, maybe we should file an issue at leak canary issue tracker, so they may take a look at it. The sample project I set up is pretty much the default template of a sample project.\r\n\r\nI will update this with new info ASAP."}}