{"action":"closed","number":2116,"pull_request":{"url":"https://api.github.com/repos/rs/SDWebImage/pulls/2116","id":154685535,"html_url":"https://github.com/rs/SDWebImage/pull/2116","diff_url":"https://github.com/rs/SDWebImage/pull/2116.diff","patch_url":"https://github.com/rs/SDWebImage/pull/2116.patch","issue_url":"https://api.github.com/repos/rs/SDWebImage/issues/2116","number":2116,"state":"closed","locked":false,"title":"Add a public API to allow user to invalidate URLSession used in SDWebImageDownloader to avoid memory leak on non-singleton instance","user":{"login":"dreampiggy","id":6919743,"avatar_url":"https://avatars2.githubusercontent.com/u/6919743?v=4","gravatar_id":"","url":"https://api.github.com/users/dreampiggy","html_url":"https://github.com/dreampiggy","followers_url":"https://api.github.com/users/dreampiggy/followers","following_url":"https://api.github.com/users/dreampiggy/following{/other_user}","gists_url":"https://api.github.com/users/dreampiggy/gists{/gist_id}","starred_url":"https://api.github.com/users/dreampiggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreampiggy/subscriptions","organizations_url":"https://api.github.com/users/dreampiggy/orgs","repos_url":"https://api.github.com/users/dreampiggy/repos","events_url":"https://api.github.com/users/dreampiggy/events{/privacy}","received_events_url":"https://api.github.com/users/dreampiggy/received_events","type":"User","site_admin":false},"body":"### New Pull Request Checklist\r\n\r\n* [x] I have read and understood the [CONTRIBUTING guide](https://github.com/rs/SDWebImage/blob/master/.github/CONTRIBUTING.md)\r\n* [x] I have read the [Documentation](http://cocoadocs.org/docsets/SDWebImage/)\r\n* [x] I have searched for a similar pull request in the [project](https://github.com/rs/SDWebImage/pulls) and found none\r\n\r\n* [x] I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)\r\n* [x] I have added the required tests to prove the fix/feature I am adding\r\n* [x] I have updated the documentation (if necessary)\r\n* [x] I have run the tests and they pass\r\n* [x] I have run the lint and it passes (`pod lib lint`)\r\n\r\nThis merge request fixes / reffers to the following issues: #1944 \r\n\r\n### Pull Request Description\r\n\r\nSDWebImageDownloader set `session` property's delegate to self. So we need to invalidate it to break retain cycle when we do not need it because `NSURLSession` hold a strong reference to delegate. \r\n\r\nFor the shared downloader, it's OK since it's all alive during application lifecycle. But for custom instance, sadly we do not have a public API to touch that `session` itself. So we should introduce one to let user call invalidate when they use custom downloader instead of the shared one. 😹 \r\n","created_at":"2017-11-26T16:14:15Z","updated_at":"2017-11-28T12:17:57Z","closed_at":"2017-11-28T12:17:57Z","merged_at":"2017-11-28T12:17:57Z","merge_commit_sha":"dbc6b6995d374edf1449c3fd76c5bf68ccbb7f2e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/rs/SDWebImage/milestones/20","html_url":"https://github.com/rs/SDWebImage/milestone/20","labels_url":"https://api.github.com/repos/rs/SDWebImage/milestones/20/labels","id":2916760,"number":20,"title":"4.2.3","description":null,"creator":{"login":"dreampiggy","id":6919743,"avatar_url":"https://avatars2.githubusercontent.com/u/6919743?v=4","gravatar_id":"","url":"https://api.github.com/users/dreampiggy","html_url":"https://github.com/dreampiggy","followers_url":"https://api.github.com/users/dreampiggy/followers","following_url":"https://api.github.com/users/dreampiggy/following{/other_user}","gists_url":"https://api.github.com/users/dreampiggy/gists{/gist_id}","starred_url":"https://api.github.com/users/dreampiggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreampiggy/subscriptions","organizations_url":"https://api.github.com/users/dreampiggy/orgs","repos_url":"https://api.github.com/users/dreampiggy/repos","events_url":"https://api.github.com/users/dreampiggy/events{/privacy}","received_events_url":"https://api.github.com/users/dreampiggy/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":1,"state":"open","created_at":"2017-11-16T10:39:47Z","updated_at":"2017-11-28T12:17:57Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/rs/SDWebImage/pulls/2116/commits","review_comments_url":"https://api.github.com/repos/rs/SDWebImage/pulls/2116/comments","review_comment_url":"https://api.github.com/repos/rs/SDWebImage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rs/SDWebImage/issues/2116/comments","statuses_url":"https://api.github.com/repos/rs/SDWebImage/statuses/f8142a1b8fc94a0608f874e50c2ffd4b10f9c1ac","head":{"label":"dreampiggy:feature_invalidate_SDWebImageDownloader","ref":"feature_invalidate_SDWebImageDownloader","sha":"f8142a1b8fc94a0608f874e50c2ffd4b10f9c1ac","user":{"login":"dreampiggy","id":6919743,"avatar_url":"https://avatars2.githubusercontent.com/u/6919743?v=4","gravatar_id":"","url":"https://api.github.com/users/dreampiggy","html_url":"https://github.com/dreampiggy","followers_url":"https://api.github.com/users/dreampiggy/followers","following_url":"https://api.github.com/users/dreampiggy/following{/other_user}","gists_url":"https://api.github.com/users/dreampiggy/gists{/gist_id}","starred_url":"https://api.github.com/users/dreampiggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreampiggy/subscriptions","organizations_url":"https://api.github.com/users/dreampiggy/orgs","repos_url":"https://api.github.com/users/dreampiggy/repos","events_url":"https://api.github.com/users/dreampiggy/events{/privacy}","received_events_url":"https://api.github.com/users/dreampiggy/received_events","type":"User","site_admin":false},"repo":{"id":95782415,"name":"SDWebImage","full_name":"dreampiggy/SDWebImage","owner":{"login":"dreampiggy","id":6919743,"avatar_url":"https://avatars2.githubusercontent.com/u/6919743?v=4","gravatar_id":"","url":"https://api.github.com/users/dreampiggy","html_url":"https://github.com/dreampiggy","followers_url":"https://api.github.com/users/dreampiggy/followers","following_url":"https://api.github.com/users/dreampiggy/following{/other_user}","gists_url":"https://api.github.com/users/dreampiggy/gists{/gist_id}","starred_url":"https://api.github.com/users/dreampiggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreampiggy/subscriptions","organizations_url":"https://api.github.com/users/dreampiggy/orgs","repos_url":"https://api.github.com/users/dreampiggy/repos","events_url":"https://api.github.com/users/dreampiggy/events{/privacy}","received_events_url":"https://api.github.com/users/dreampiggy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dreampiggy/SDWebImage","description":"Asynchronous image downloader with cache support as a UIImageView category","fork":true,"url":"https://api.github.com/repos/dreampiggy/SDWebImage","forks_url":"https://api.github.com/repos/dreampiggy/SDWebImage/forks","keys_url":"https://api.github.com/repos/dreampiggy/SDWebImage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dreampiggy/SDWebImage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dreampiggy/SDWebImage/teams","hooks_url":"https://api.github.com/repos/dreampiggy/SDWebImage/hooks","issue_events_url":"https://api.github.com/repos/dreampiggy/SDWebImage/issues/events{/number}","events_url":"https://api.github.com/repos/dreampiggy/SDWebImage/events","assignees_url":"https://api.github.com/repos/dreampiggy/SDWebImage/assignees{/user}","branches_url":"https://api.github.com/repos/dreampiggy/SDWebImage/branches{/branch}","tags_url":"https://api.github.com/repos/dreampiggy/SDWebImage/tags","blobs_url":"https://api.github.com/repos/dreampiggy/SDWebImage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dreampiggy/SDWebImage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dreampiggy/SDWebImage/git/refs{/sha}","trees_url":"https://api.github.com/repos/dreampiggy/SDWebImage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dreampiggy/SDWebImage/statuses/{sha}","languages_url":"https://api.github.com/repos/dreampiggy/SDWebImage/languages","stargazers_url":"https://api.github.com/repos/dreampiggy/SDWebImage/stargazers","contributors_url":"https://api.github.com/repos/dreampiggy/SDWebImage/contributors","subscribers_url":"https://api.github.com/repos/dreampiggy/SDWebImage/subscribers","subscription_url":"https://api.github.com/repos/dreampiggy/SDWebImage/subscription","commits_url":"https://api.github.com/repos/dreampiggy/SDWebImage/commits{/sha}","git_commits_url":"https://api.github.com/repos/dreampiggy/SDWebImage/git/commits{/sha}","comments_url":"https://api.github.com/repos/dreampiggy/SDWebImage/comments{/number}","issue_comment_url":"https://api.github.com/repos/dreampiggy/SDWebImage/issues/comments{/number}","contents_url":"https://api.github.com/repos/dreampiggy/SDWebImage/contents/{+path}","compare_url":"https://api.github.com/repos/dreampiggy/SDWebImage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dreampiggy/SDWebImage/merges","archive_url":"https://api.github.com/repos/dreampiggy/SDWebImage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dreampiggy/SDWebImage/downloads","issues_url":"https://api.github.com/repos/dreampiggy/SDWebImage/issues{/number}","pulls_url":"https://api.github.com/repos/dreampiggy/SDWebImage/pulls{/number}","milestones_url":"https://api.github.com/repos/dreampiggy/SDWebImage/milestones{/number}","notifications_url":"https://api.github.com/repos/dreampiggy/SDWebImage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dreampiggy/SDWebImage/labels{/name}","releases_url":"https://api.github.com/repos/dreampiggy/SDWebImage/releases{/id}","deployments_url":"https://api.github.com/repos/dreampiggy/SDWebImage/deployments","created_at":"2017-06-29T13:48:41Z","updated_at":"2017-06-29T13:48:44Z","pushed_at":"2017-11-27T03:40:52Z","git_url":"git://github.com/dreampiggy/SDWebImage.git","ssh_url":"git@github.com:dreampiggy/SDWebImage.git","clone_url":"https://github.com/dreampiggy/SDWebImage.git","svn_url":"https://github.com/dreampiggy/SDWebImage","homepage":"http://cocoadocs.org/docsets/SDWebImage","size":6711,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rs:master","ref":"master","sha":"5872bd660bcb6b4da980f8a8efba9b9aee79b31e","user":{"login":"rs","id":68232,"avatar_url":"https://avatars2.githubusercontent.com/u/68232?v=4","gravatar_id":"","url":"https://api.github.com/users/rs","html_url":"https://github.com/rs","followers_url":"https://api.github.com/users/rs/followers","following_url":"https://api.github.com/users/rs/following{/other_user}","gists_url":"https://api.github.com/users/rs/gists{/gist_id}","starred_url":"https://api.github.com/users/rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rs/subscriptions","organizations_url":"https://api.github.com/users/rs/orgs","repos_url":"https://api.github.com/users/rs/repos","events_url":"https://api.github.com/users/rs/events{/privacy}","received_events_url":"https://api.github.com/users/rs/received_events","type":"User","site_admin":false},"repo":{"id":313419,"name":"SDWebImage","full_name":"rs/SDWebImage","owner":{"login":"rs","id":68232,"avatar_url":"https://avatars2.githubusercontent.com/u/68232?v=4","gravatar_id":"","url":"https://api.github.com/users/rs","html_url":"https://github.com/rs","followers_url":"https://api.github.com/users/rs/followers","following_url":"https://api.github.com/users/rs/following{/other_user}","gists_url":"https://api.github.com/users/rs/gists{/gist_id}","starred_url":"https://api.github.com/users/rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rs/subscriptions","organizations_url":"https://api.github.com/users/rs/orgs","repos_url":"https://api.github.com/users/rs/repos","events_url":"https://api.github.com/users/rs/events{/privacy}","received_events_url":"https://api.github.com/users/rs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rs/SDWebImage","description":"Asynchronous image downloader with cache support as a UIImageView category","fork":false,"url":"https://api.github.com/repos/rs/SDWebImage","forks_url":"https://api.github.com/repos/rs/SDWebImage/forks","keys_url":"https://api.github.com/repos/rs/SDWebImage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rs/SDWebImage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rs/SDWebImage/teams","hooks_url":"https://api.github.com/repos/rs/SDWebImage/hooks","issue_events_url":"https://api.github.com/repos/rs/SDWebImage/issues/events{/number}","events_url":"https://api.github.com/repos/rs/SDWebImage/events","assignees_url":"https://api.github.com/repos/rs/SDWebImage/assignees{/user}","branches_url":"https://api.github.com/repos/rs/SDWebImage/branches{/branch}","tags_url":"https://api.github.com/repos/rs/SDWebImage/tags","blobs_url":"https://api.github.com/repos/rs/SDWebImage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rs/SDWebImage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rs/SDWebImage/git/refs{/sha}","trees_url":"https://api.github.com/repos/rs/SDWebImage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rs/SDWebImage/statuses/{sha}","languages_url":"https://api.github.com/repos/rs/SDWebImage/languages","stargazers_url":"https://api.github.com/repos/rs/SDWebImage/stargazers","contributors_url":"https://api.github.com/repos/rs/SDWebImage/contributors","subscribers_url":"https://api.github.com/repos/rs/SDWebImage/subscribers","subscription_url":"https://api.github.com/repos/rs/SDWebImage/subscription","commits_url":"https://api.github.com/repos/rs/SDWebImage/commits{/sha}","git_commits_url":"https://api.github.com/repos/rs/SDWebImage/git/commits{/sha}","comments_url":"https://api.github.com/repos/rs/SDWebImage/comments{/number}","issue_comment_url":"https://api.github.com/repos/rs/SDWebImage/issues/comments{/number}","contents_url":"https://api.github.com/repos/rs/SDWebImage/contents/{+path}","compare_url":"https://api.github.com/repos/rs/SDWebImage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rs/SDWebImage/merges","archive_url":"https://api.github.com/repos/rs/SDWebImage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rs/SDWebImage/downloads","issues_url":"https://api.github.com/repos/rs/SDWebImage/issues{/number}","pulls_url":"https://api.github.com/repos/rs/SDWebImage/pulls{/number}","milestones_url":"https://api.github.com/repos/rs/SDWebImage/milestones{/number}","notifications_url":"https://api.github.com/repos/rs/SDWebImage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rs/SDWebImage/labels{/name}","releases_url":"https://api.github.com/repos/rs/SDWebImage/releases{/id}","deployments_url":"https://api.github.com/repos/rs/SDWebImage/deployments","created_at":"2009-09-21T17:39:19Z","updated_at":"2017-11-28T12:05:01Z","pushed_at":"2017-11-28T12:17:57Z","git_url":"git://github.com/rs/SDWebImage.git","ssh_url":"git@github.com:rs/SDWebImage.git","clone_url":"https://github.com/rs/SDWebImage.git","svn_url":"https://github.com/rs/SDWebImage","homepage":"http://cocoadocs.org/docsets/SDWebImage","size":6718,"stargazers_count":18937,"watchers_count":18937,"language":"Objective-C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5008,"mirror_url":null,"archived":false,"open_issues_count":56,"forks":5008,"open_issues":56,"watchers":18937,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rs/SDWebImage/pulls/2116"},"html":{"href":"https://github.com/rs/SDWebImage/pull/2116"},"issue":{"href":"https://api.github.com/repos/rs/SDWebImage/issues/2116"},"comments":{"href":"https://api.github.com/repos/rs/SDWebImage/issues/2116/comments"},"review_comments":{"href":"https://api.github.com/repos/rs/SDWebImage/pulls/2116/comments"},"review_comment":{"href":"https://api.github.com/repos/rs/SDWebImage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rs/SDWebImage/pulls/2116/commits"},"statuses":{"href":"https://api.github.com/repos/rs/SDWebImage/statuses/f8142a1b8fc94a0608f874e50c2ffd4b10f9c1ac"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"dreampiggy","id":6919743,"avatar_url":"https://avatars2.githubusercontent.com/u/6919743?v=4","gravatar_id":"","url":"https://api.github.com/users/dreampiggy","html_url":"https://github.com/dreampiggy","followers_url":"https://api.github.com/users/dreampiggy/followers","following_url":"https://api.github.com/users/dreampiggy/following{/other_user}","gists_url":"https://api.github.com/users/dreampiggy/gists{/gist_id}","starred_url":"https://api.github.com/users/dreampiggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreampiggy/subscriptions","organizations_url":"https://api.github.com/users/dreampiggy/orgs","repos_url":"https://api.github.com/users/dreampiggy/repos","events_url":"https://api.github.com/users/dreampiggy/events{/privacy}","received_events_url":"https://api.github.com/users/dreampiggy/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":3,"additions":20,"deletions":3,"changed_files":3}}
{"actor":{"display_login":"dreampiggy"}}