{"action":"created","comment":{"url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/comments/92961329","pull_request_review_id":13482380,"id":92961329,"diff_hunk":"@@ -191,35 +190,40 @@ NAN_METHOD(Err) {\n   info.GetReturnValue().Set(Nan::New(nn_strerror(nn_errno())).ToLocalChecked());\n }\n \n-typedef struct nanomsg_socket_s {\n-  uv_poll_t poll_handle;\n-  uv_os_sock_t sockfd;\n-  Nan::Callback *callback;\n-} nanomsg_socket_t;\n+class NanoMsgPollCtx {\n+  private:\n+  public:\n+    uv_poll_t poll_handle;\n+    uv_os_sock_t sockfd;\n+    Nan::Callback *callback;\n+    NanoMsgPollCtx (int s, bool is_sender, Local<v8::Function> cb) {\n+      callback = new Nan::Callback(cb);\n+      size_t siz = sizeof(uv_os_sock_t);\n+      nn_getsockopt(s, NN_SOL_SOCKET, is_sender ? NN_SNDFD : NN_RCVFD, &sockfd,\n+          &siz);\n+      poll_handle.data = this;\n+    }\n+    ~NanoMsgPollCtx () {\n+      delete callback;\n+    }","path":"src/node_nanomsg.cc","position":null,"original_position":35,"commit_id":"e5412bec5a0d2bee57a104f9709a7f755e8fa282","original_commit_id":"65e496ae3ff4e083e65581524dd85776622c357a","user":{"login":"kkoopa","id":4103081,"avatar_url":"https://avatars.githubusercontent.com/u/4103081?v=3","gravatar_id":"","url":"https://api.github.com/users/kkoopa","html_url":"https://github.com/kkoopa","followers_url":"https://api.github.com/users/kkoopa/followers","following_url":"https://api.github.com/users/kkoopa/following{/other_user}","gists_url":"https://api.github.com/users/kkoopa/gists{/gist_id}","starred_url":"https://api.github.com/users/kkoopa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkoopa/subscriptions","organizations_url":"https://api.github.com/users/kkoopa/orgs","repos_url":"https://api.github.com/users/kkoopa/repos","events_url":"https://api.github.com/users/kkoopa/events{/privacy}","received_events_url":"https://api.github.com/users/kkoopa/received_events","type":"User","site_admin":false},"body":"See above comment. It should say ` PollCtx() : callback(cb)`, not ` PollCtx() : callback(Nan::Callback(cb))`.","created_at":"2016-12-19T02:45:28Z","updated_at":"2016-12-19T02:45:28Z","html_url":"https://github.com/nickdesaulniers/node-nanomsg/pull/169#discussion_r92961329","pull_request_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/169","_links":{"self":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/comments/92961329"},"html":{"href":"https://github.com/nickdesaulniers/node-nanomsg/pull/169#discussion_r92961329"},"pull_request":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/169"}}},"pull_request":{"url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/169","id":98466692,"html_url":"https://github.com/nickdesaulniers/node-nanomsg/pull/169","diff_url":"https://github.com/nickdesaulniers/node-nanomsg/pull/169.diff","patch_url":"https://github.com/nickdesaulniers/node-nanomsg/pull/169.patch","issue_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/169","number":169,"state":"open","locked":false,"title":"Memleak","user":{"login":"nickdesaulniers","id":1823839,"avatar_url":"https://avatars.githubusercontent.com/u/1823839?v=3","gravatar_id":"","url":"https://api.github.com/users/nickdesaulniers","html_url":"https://github.com/nickdesaulniers","followers_url":"https://api.github.com/users/nickdesaulniers/followers","following_url":"https://api.github.com/users/nickdesaulniers/following{/other_user}","gists_url":"https://api.github.com/users/nickdesaulniers/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdesaulniers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdesaulniers/subscriptions","organizations_url":"https://api.github.com/users/nickdesaulniers/orgs","repos_url":"https://api.github.com/users/nickdesaulniers/repos","events_url":"https://api.github.com/users/nickdesaulniers/events{/privacy}","received_events_url":"https://api.github.com/users/nickdesaulniers/received_events","type":"User","site_admin":false},"body":"review? @reqshark @m-ohuchi @deepakprabhakara @k-keisuke @kkoopa ","created_at":"2016-12-18T07:01:14Z","updated_at":"2016-12-19T02:45:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76ca4fe4555c3461de00cd51b636e91db313cb33","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/169/commits","review_comments_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/169/comments","review_comment_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/169/comments","statuses_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/statuses/e5412bec5a0d2bee57a104f9709a7f755e8fa282","head":{"label":"nickdesaulniers:memleak","ref":"memleak","sha":"e5412bec5a0d2bee57a104f9709a7f755e8fa282","user":{"login":"nickdesaulniers","id":1823839,"avatar_url":"https://avatars.githubusercontent.com/u/1823839?v=3","gravatar_id":"","url":"https://api.github.com/users/nickdesaulniers","html_url":"https://github.com/nickdesaulniers","followers_url":"https://api.github.com/users/nickdesaulniers/followers","following_url":"https://api.github.com/users/nickdesaulniers/following{/other_user}","gists_url":"https://api.github.com/users/nickdesaulniers/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdesaulniers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdesaulniers/subscriptions","organizations_url":"https://api.github.com/users/nickdesaulniers/orgs","repos_url":"https://api.github.com/users/nickdesaulniers/repos","events_url":"https://api.github.com/users/nickdesaulniers/events{/privacy}","received_events_url":"https://api.github.com/users/nickdesaulniers/received_events","type":"User","site_admin":false},"repo":{"id":12425564,"name":"node-nanomsg","full_name":"nickdesaulniers/node-nanomsg","owner":{"login":"nickdesaulniers","id":1823839,"avatar_url":"https://avatars.githubusercontent.com/u/1823839?v=3","gravatar_id":"","url":"https://api.github.com/users/nickdesaulniers","html_url":"https://github.com/nickdesaulniers","followers_url":"https://api.github.com/users/nickdesaulniers/followers","following_url":"https://api.github.com/users/nickdesaulniers/following{/other_user}","gists_url":"https://api.github.com/users/nickdesaulniers/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdesaulniers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdesaulniers/subscriptions","organizations_url":"https://api.github.com/users/nickdesaulniers/orgs","repos_url":"https://api.github.com/users/nickdesaulniers/repos","events_url":"https://api.github.com/users/nickdesaulniers/events{/privacy}","received_events_url":"https://api.github.com/users/nickdesaulniers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nickdesaulniers/node-nanomsg","description":"Node.js binding for nanomsg","fork":false,"url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg","forks_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/forks","keys_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/teams","hooks_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/hooks","issue_events_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/events{/number}","events_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/events","assignees_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/assignees{/user}","branches_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/branches{/branch}","tags_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/tags","blobs_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/refs{/sha}","trees_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/statuses/{sha}","languages_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/languages","stargazers_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/stargazers","contributors_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/contributors","subscribers_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/subscribers","subscription_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/subscription","commits_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/commits{/sha}","git_commits_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/commits{/sha}","comments_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/comments{/number}","issue_comment_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/comments{/number}","contents_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/contents/{+path}","compare_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/merges","archive_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/downloads","issues_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues{/number}","pulls_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls{/number}","milestones_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/milestones{/number}","notifications_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/labels{/name}","releases_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/releases{/id}","deployments_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/deployments","created_at":"2013-08-28T05:39:48Z","updated_at":"2016-12-13T05:50:00Z","pushed_at":"2016-12-18T21:50:11Z","git_url":"git://github.com/nickdesaulniers/node-nanomsg.git","ssh_url":"git@github.com:nickdesaulniers/node-nanomsg.git","clone_url":"https://github.com/nickdesaulniers/node-nanomsg.git","svn_url":"https://github.com/nickdesaulniers/node-nanomsg","homepage":null,"size":958,"stargazers_count":254,"watchers_count":254,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":19,"forks":38,"open_issues":19,"watchers":254,"default_branch":"master"}},"base":{"label":"nickdesaulniers:master","ref":"master","sha":"a271345fea86fbff6a4ad7f4006271b0ae5e0cff","user":{"login":"nickdesaulniers","id":1823839,"avatar_url":"https://avatars.githubusercontent.com/u/1823839?v=3","gravatar_id":"","url":"https://api.github.com/users/nickdesaulniers","html_url":"https://github.com/nickdesaulniers","followers_url":"https://api.github.com/users/nickdesaulniers/followers","following_url":"https://api.github.com/users/nickdesaulniers/following{/other_user}","gists_url":"https://api.github.com/users/nickdesaulniers/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdesaulniers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdesaulniers/subscriptions","organizations_url":"https://api.github.com/users/nickdesaulniers/orgs","repos_url":"https://api.github.com/users/nickdesaulniers/repos","events_url":"https://api.github.com/users/nickdesaulniers/events{/privacy}","received_events_url":"https://api.github.com/users/nickdesaulniers/received_events","type":"User","site_admin":false},"repo":{"id":12425564,"name":"node-nanomsg","full_name":"nickdesaulniers/node-nanomsg","owner":{"login":"nickdesaulniers","id":1823839,"avatar_url":"https://avatars.githubusercontent.com/u/1823839?v=3","gravatar_id":"","url":"https://api.github.com/users/nickdesaulniers","html_url":"https://github.com/nickdesaulniers","followers_url":"https://api.github.com/users/nickdesaulniers/followers","following_url":"https://api.github.com/users/nickdesaulniers/following{/other_user}","gists_url":"https://api.github.com/users/nickdesaulniers/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdesaulniers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdesaulniers/subscriptions","organizations_url":"https://api.github.com/users/nickdesaulniers/orgs","repos_url":"https://api.github.com/users/nickdesaulniers/repos","events_url":"https://api.github.com/users/nickdesaulniers/events{/privacy}","received_events_url":"https://api.github.com/users/nickdesaulniers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nickdesaulniers/node-nanomsg","description":"Node.js binding for nanomsg","fork":false,"url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg","forks_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/forks","keys_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/teams","hooks_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/hooks","issue_events_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/events{/number}","events_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/events","assignees_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/assignees{/user}","branches_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/branches{/branch}","tags_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/tags","blobs_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/refs{/sha}","trees_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/statuses/{sha}","languages_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/languages","stargazers_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/stargazers","contributors_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/contributors","subscribers_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/subscribers","subscription_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/subscription","commits_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/commits{/sha}","git_commits_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/git/commits{/sha}","comments_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/comments{/number}","issue_comment_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/comments{/number}","contents_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/contents/{+path}","compare_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/merges","archive_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/downloads","issues_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues{/number}","pulls_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls{/number}","milestones_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/milestones{/number}","notifications_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/labels{/name}","releases_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/releases{/id}","deployments_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/deployments","created_at":"2013-08-28T05:39:48Z","updated_at":"2016-12-13T05:50:00Z","pushed_at":"2016-12-18T21:50:11Z","git_url":"git://github.com/nickdesaulniers/node-nanomsg.git","ssh_url":"git@github.com:nickdesaulniers/node-nanomsg.git","clone_url":"https://github.com/nickdesaulniers/node-nanomsg.git","svn_url":"https://github.com/nickdesaulniers/node-nanomsg","homepage":null,"size":958,"stargazers_count":254,"watchers_count":254,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":19,"forks":38,"open_issues":19,"watchers":254,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/169"},"html":{"href":"https://github.com/nickdesaulniers/node-nanomsg/pull/169"},"issue":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/169"},"comments":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/169/comments"},"review_comments":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/169/comments"},"review_comment":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/pulls/169/commits"},"statuses":{"href":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/statuses/e5412bec5a0d2bee57a104f9709a7f755e8fa282"}}}}
{"actor":{"display_login":"kkoopa"}}