{"action":"opened","number":440,"pull_request":{"url":"https://api.github.com/repos/php-curl-class/php-curl-class/pulls/440","id":114528310,"html_url":"https://github.com/php-curl-class/php-curl-class/pull/440","diff_url":"https://github.com/php-curl-class/php-curl-class/pull/440.diff","patch_url":"https://github.com/php-curl-class/php-curl-class/pull/440.patch","issue_url":"https://api.github.com/repos/php-curl-class/php-curl-class/issues/440","number":440,"state":"open","locked":false,"title":"fix leak memory","user":{"login":"adrianceding","id":4156079,"avatar_url":"https://avatars1.githubusercontent.com/u/4156079?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianceding","html_url":"https://github.com/adrianceding","followers_url":"https://api.github.com/users/adrianceding/followers","following_url":"https://api.github.com/users/adrianceding/following{/other_user}","gists_url":"https://api.github.com/users/adrianceding/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianceding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianceding/subscriptions","organizations_url":"https://api.github.com/users/adrianceding/orgs","repos_url":"https://api.github.com/users/adrianceding/repos","events_url":"https://api.github.com/users/adrianceding/events{/privacy}","received_events_url":"https://api.github.com/users/adrianceding/received_events","type":"User","site_admin":false},"body":"fix leak memory\r\n**Demo**\r\n```\r\n$multiCurl = new MultiCurl();\r\n\r\nfor ($i0 = 0; $i0 < 10; $i0++) {\r\n    for ($i = 0; $i <= 1000; $i++) {\r\n        $multiCurl->addGet('http://127.0.0.1/test.php');\r\n    }\r\n\r\n    $multiCurl->start();\r\n\r\n    echo $i0 . ' Memory: ' . memory_get_usage(true) / 1024 / 1024 . 'MB' . PHP_EOL;\r\n}\r\necho 'Before Unset MultiCurl Memory: ' . memory_get_usage(true) / 1024 / 1024 . 'MB' . PHP_EOL;\r\n$multiCurl->close();\r\n\r\nunset($multiCurl);\r\n\r\necho 'Latest Memory: ' . memory_get_usage(true) / 1024 / 1024 . 'MB' . PHP_EOL;\r\n```\r\n\r\n\r\n**Result**\r\n0 Memory: 8.25MB\r\n1 Memory: 14.5MB\r\n2 Memory: 21.25MB\r\n3 Memory: 27.75MB\r\n4 Memory: 34MB\r\n5 Memory: 41.25MB\r\n6 Memory: 47.5MB\r\n7 Memory: 53.75MB\r\n8 Memory: 59.75MB\r\n9 Memory: 65.75MB\r\nBefore Unset MultiCurl Memory: 65.75MB\r\nLatest Memory: 65.75MB\r\n[Finished in 21.1s]\r\n","created_at":"2017-04-06T06:12:05Z","updated_at":"2017-04-06T06:12:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/php-curl-class/php-curl-class/pulls/440/commits","review_comments_url":"https://api.github.com/repos/php-curl-class/php-curl-class/pulls/440/comments","review_comment_url":"https://api.github.com/repos/php-curl-class/php-curl-class/pulls/comments{/number}","comments_url":"https://api.github.com/repos/php-curl-class/php-curl-class/issues/440/comments","statuses_url":"https://api.github.com/repos/php-curl-class/php-curl-class/statuses/e0cf057797e560ea9507252b3438e5e2bd42ec26","head":{"label":"adrianceding:patch-1","ref":"patch-1","sha":"e0cf057797e560ea9507252b3438e5e2bd42ec26","user":{"login":"adrianceding","id":4156079,"avatar_url":"https://avatars1.githubusercontent.com/u/4156079?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianceding","html_url":"https://github.com/adrianceding","followers_url":"https://api.github.com/users/adrianceding/followers","following_url":"https://api.github.com/users/adrianceding/following{/other_user}","gists_url":"https://api.github.com/users/adrianceding/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianceding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianceding/subscriptions","organizations_url":"https://api.github.com/users/adrianceding/orgs","repos_url":"https://api.github.com/users/adrianceding/repos","events_url":"https://api.github.com/users/adrianceding/events{/privacy}","received_events_url":"https://api.github.com/users/adrianceding/received_events","type":"User","site_admin":false},"repo":{"id":87280741,"name":"php-curl-class","full_name":"adrianceding/php-curl-class","owner":{"login":"adrianceding","id":4156079,"avatar_url":"https://avatars1.githubusercontent.com/u/4156079?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianceding","html_url":"https://github.com/adrianceding","followers_url":"https://api.github.com/users/adrianceding/followers","following_url":"https://api.github.com/users/adrianceding/following{/other_user}","gists_url":"https://api.github.com/users/adrianceding/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianceding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianceding/subscriptions","organizations_url":"https://api.github.com/users/adrianceding/orgs","repos_url":"https://api.github.com/users/adrianceding/repos","events_url":"https://api.github.com/users/adrianceding/events{/privacy}","received_events_url":"https://api.github.com/users/adrianceding/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adrianceding/php-curl-class","description":"PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs","fork":true,"url":"https://api.github.com/repos/adrianceding/php-curl-class","forks_url":"https://api.github.com/repos/adrianceding/php-curl-class/forks","keys_url":"https://api.github.com/repos/adrianceding/php-curl-class/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adrianceding/php-curl-class/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adrianceding/php-curl-class/teams","hooks_url":"https://api.github.com/repos/adrianceding/php-curl-class/hooks","issue_events_url":"https://api.github.com/repos/adrianceding/php-curl-class/issues/events{/number}","events_url":"https://api.github.com/repos/adrianceding/php-curl-class/events","assignees_url":"https://api.github.com/repos/adrianceding/php-curl-class/assignees{/user}","branches_url":"https://api.github.com/repos/adrianceding/php-curl-class/branches{/branch}","tags_url":"https://api.github.com/repos/adrianceding/php-curl-class/tags","blobs_url":"https://api.github.com/repos/adrianceding/php-curl-class/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adrianceding/php-curl-class/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adrianceding/php-curl-class/git/refs{/sha}","trees_url":"https://api.github.com/repos/adrianceding/php-curl-class/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adrianceding/php-curl-class/statuses/{sha}","languages_url":"https://api.github.com/repos/adrianceding/php-curl-class/languages","stargazers_url":"https://api.github.com/repos/adrianceding/php-curl-class/stargazers","contributors_url":"https://api.github.com/repos/adrianceding/php-curl-class/contributors","subscribers_url":"https://api.github.com/repos/adrianceding/php-curl-class/subscribers","subscription_url":"https://api.github.com/repos/adrianceding/php-curl-class/subscription","commits_url":"https://api.github.com/repos/adrianceding/php-curl-class/commits{/sha}","git_commits_url":"https://api.github.com/repos/adrianceding/php-curl-class/git/commits{/sha}","comments_url":"https://api.github.com/repos/adrianceding/php-curl-class/comments{/number}","issue_comment_url":"https://api.github.com/repos/adrianceding/php-curl-class/issues/comments{/number}","contents_url":"https://api.github.com/repos/adrianceding/php-curl-class/contents/{+path}","compare_url":"https://api.github.com/repos/adrianceding/php-curl-class/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adrianceding/php-curl-class/merges","archive_url":"https://api.github.com/repos/adrianceding/php-curl-class/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adrianceding/php-curl-class/downloads","issues_url":"https://api.github.com/repos/adrianceding/php-curl-class/issues{/number}","pulls_url":"https://api.github.com/repos/adrianceding/php-curl-class/pulls{/number}","milestones_url":"https://api.github.com/repos/adrianceding/php-curl-class/milestones{/number}","notifications_url":"https://api.github.com/repos/adrianceding/php-curl-class/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adrianceding/php-curl-class/labels{/name}","releases_url":"https://api.github.com/repos/adrianceding/php-curl-class/releases{/id}","deployments_url":"https://api.github.com/repos/adrianceding/php-curl-class/deployments","created_at":"2017-04-05T07:38:25Z","updated_at":"2017-04-05T07:38:27Z","pushed_at":"2017-04-06T06:09:40Z","git_url":"git://github.com/adrianceding/php-curl-class.git","ssh_url":"git@github.com:adrianceding/php-curl-class.git","clone_url":"https://github.com/adrianceding/php-curl-class.git","svn_url":"https://github.com/adrianceding/php-curl-class","homepage":"https://www.phpcurlclass.com/","size":1116,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"php-curl-class:master","ref":"master","sha":"5d1a9e4c0184d80f8e2f80fc040da5254831c21b","user":{"login":"php-curl-class","id":5246776,"avatar_url":"https://avatars2.githubusercontent.com/u/5246776?v=3","gravatar_id":"","url":"https://api.github.com/users/php-curl-class","html_url":"https://github.com/php-curl-class","followers_url":"https://api.github.com/users/php-curl-class/followers","following_url":"https://api.github.com/users/php-curl-class/following{/other_user}","gists_url":"https://api.github.com/users/php-curl-class/gists{/gist_id}","starred_url":"https://api.github.com/users/php-curl-class/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-curl-class/subscriptions","organizations_url":"https://api.github.com/users/php-curl-class/orgs","repos_url":"https://api.github.com/users/php-curl-class/repos","events_url":"https://api.github.com/users/php-curl-class/events{/privacy}","received_events_url":"https://api.github.com/users/php-curl-class/received_events","type":"User","site_admin":false},"repo":{"id":12165811,"name":"php-curl-class","full_name":"php-curl-class/php-curl-class","owner":{"login":"php-curl-class","id":5246776,"avatar_url":"https://avatars2.githubusercontent.com/u/5246776?v=3","gravatar_id":"","url":"https://api.github.com/users/php-curl-class","html_url":"https://github.com/php-curl-class","followers_url":"https://api.github.com/users/php-curl-class/followers","following_url":"https://api.github.com/users/php-curl-class/following{/other_user}","gists_url":"https://api.github.com/users/php-curl-class/gists{/gist_id}","starred_url":"https://api.github.com/users/php-curl-class/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-curl-class/subscriptions","organizations_url":"https://api.github.com/users/php-curl-class/orgs","repos_url":"https://api.github.com/users/php-curl-class/repos","events_url":"https://api.github.com/users/php-curl-class/events{/privacy}","received_events_url":"https://api.github.com/users/php-curl-class/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/php-curl-class/php-curl-class","description":"PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs","fork":false,"url":"https://api.github.com/repos/php-curl-class/php-curl-class","forks_url":"https://api.github.com/repos/php-curl-class/php-curl-class/forks","keys_url":"https://api.github.com/repos/php-curl-class/php-curl-class/keys{/key_id}","collaborators_url":"https://api.github.com/repos/php-curl-class/php-curl-class/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/php-curl-class/php-curl-class/teams","hooks_url":"https://api.github.com/repos/php-curl-class/php-curl-class/hooks","issue_events_url":"https://api.github.com/repos/php-curl-class/php-curl-class/issues/events{/number}","events_url":"https://api.github.com/repos/php-curl-class/php-curl-class/events","assignees_url":"https://api.github.com/repos/php-curl-class/php-curl-class/assignees{/user}","branches_url":"https://api.github.com/repos/php-curl-class/php-curl-class/branches{/branch}","tags_url":"https://api.github.com/repos/php-curl-class/php-curl-class/tags","blobs_url":"https://api.github.com/repos/php-curl-class/php-curl-class/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/php-curl-class/php-curl-class/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/php-curl-class/php-curl-class/git/refs{/sha}","trees_url":"https://api.github.com/repos/php-curl-class/php-curl-class/git/trees{/sha}","statuses_url":"https://api.github.com/repos/php-curl-class/php-curl-class/statuses/{sha}","languages_url":"https://api.github.com/repos/php-curl-class/php-curl-class/languages","stargazers_url":"https://api.github.com/repos/php-curl-class/php-curl-class/stargazers","contributors_url":"https://api.github.com/repos/php-curl-class/php-curl-class/contributors","subscribers_url":"https://api.github.com/repos/php-curl-class/php-curl-class/subscribers","subscription_url":"https://api.github.com/repos/php-curl-class/php-curl-class/subscription","commits_url":"https://api.github.com/repos/php-curl-class/php-curl-class/commits{/sha}","git_commits_url":"https://api.github.com/repos/php-curl-class/php-curl-class/git/commits{/sha}","comments_url":"https://api.github.com/repos/php-curl-class/php-curl-class/comments{/number}","issue_comment_url":"https://api.github.com/repos/php-curl-class/php-curl-class/issues/comments{/number}","contents_url":"https://api.github.com/repos/php-curl-class/php-curl-class/contents/{+path}","compare_url":"https://api.github.com/repos/php-curl-class/php-curl-class/compare/{base}...{head}","merges_url":"https://api.github.com/repos/php-curl-class/php-curl-class/merges","archive_url":"https://api.github.com/repos/php-curl-class/php-curl-class/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/php-curl-class/php-curl-class/downloads","issues_url":"https://api.github.com/repos/php-curl-class/php-curl-class/issues{/number}","pulls_url":"https://api.github.com/repos/php-curl-class/php-curl-class/pulls{/number}","milestones_url":"https://api.github.com/repos/php-curl-class/php-curl-class/milestones{/number}","notifications_url":"https://api.github.com/repos/php-curl-class/php-curl-class/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/php-curl-class/php-curl-class/labels{/name}","releases_url":"https://api.github.com/repos/php-curl-class/php-curl-class/releases{/id}","deployments_url":"https://api.github.com/repos/php-curl-class/php-curl-class/deployments","created_at":"2013-08-16T18:56:52Z","updated_at":"2017-04-06T05:48:25Z","pushed_at":"2017-03-20T09:06:16Z","git_url":"git://github.com/php-curl-class/php-curl-class.git","ssh_url":"git@github.com:php-curl-class/php-curl-class.git","clone_url":"https://github.com/php-curl-class/php-curl-class.git","svn_url":"https://github.com/php-curl-class/php-curl-class","homepage":"https://www.phpcurlclass.com/","size":1116,"stargazers_count":1290,"watchers_count":1290,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":428,"mirror_url":null,"open_issues_count":28,"forks":428,"open_issues":28,"watchers":1290,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/php-curl-class/php-curl-class/pulls/440"},"html":{"href":"https://github.com/php-curl-class/php-curl-class/pull/440"},"issue":{"href":"https://api.github.com/repos/php-curl-class/php-curl-class/issues/440"},"comments":{"href":"https://api.github.com/repos/php-curl-class/php-curl-class/issues/440/comments"},"review_comments":{"href":"https://api.github.com/repos/php-curl-class/php-curl-class/pulls/440/comments"},"review_comment":{"href":"https://api.github.com/repos/php-curl-class/php-curl-class/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/php-curl-class/php-curl-class/pulls/440/commits"},"statuses":{"href":"https://api.github.com/repos/php-curl-class/php-curl-class/statuses/e0cf057797e560ea9507252b3438e5e2bd42ec26"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"adrianceding"}}