{"action":"created","issue":{"url":"https://api.github.com/repos/iojs/io.js/issues/1152","labels_url":"https://api.github.com/repos/iojs/io.js/issues/1152/labels{/name}","comments_url":"https://api.github.com/repos/iojs/io.js/issues/1152/comments","events_url":"https://api.github.com/repos/iojs/io.js/issues/1152/events","html_url":"https://github.com/iojs/io.js/pull/1152","id":61349699,"number":1152,"title":"timers: fix unref() memory leak","user":{"login":"Fishrock123","id":1093990,"avatar_url":"https://avatars.githubusercontent.com/u/1093990?v=3","gravatar_id":"","url":"https://api.github.com/users/Fishrock123","html_url":"https://github.com/Fishrock123","followers_url":"https://api.github.com/users/Fishrock123/followers","following_url":"https://api.github.com/users/Fishrock123/following{/other_user}","gists_url":"https://api.github.com/users/Fishrock123/gists{/gist_id}","starred_url":"https://api.github.com/users/Fishrock123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fishrock123/subscriptions","organizations_url":"https://api.github.com/users/Fishrock123/orgs","repos_url":"https://api.github.com/users/Fishrock123/repos","events_url":"https://api.github.com/users/Fishrock123/events{/privacy}","received_events_url":"https://api.github.com/users/Fishrock123/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/iojs/io.js/labels/timers","name":"timers","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":27,"created_at":"2015-03-14T01:56:28Z","updated_at":"2015-03-25T17:56:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/iojs/io.js/pulls/1152","html_url":"https://github.com/iojs/io.js/pull/1152","diff_url":"https://github.com/iojs/io.js/pull/1152.diff","patch_url":"https://github.com/iojs/io.js/pull/1152.patch"},"body":"Port of https://github.com/joyent/node/commit/0d051238be2e07e671d7d9f4f444e0cc1efadf1b\r\n\r\nFixes: https://github.com/iojs/io.js/issues/1151\r\n\r\nNot sure what to call the test, or even if this test is particularly good. (or if it even needs a test)\r\n\r\nR=@trevnorris"},"comment":{"url":"https://api.github.com/repos/iojs/io.js/issues/comments/86148867","html_url":"https://github.com/iojs/io.js/pull/1152#issuecomment-86148867","issue_url":"https://api.github.com/repos/iojs/io.js/issues/1152","id":86148867,"user":{"login":"Fishrock123","id":1093990,"avatar_url":"https://avatars.githubusercontent.com/u/1093990?v=3","gravatar_id":"","url":"https://api.github.com/users/Fishrock123","html_url":"https://github.com/Fishrock123","followers_url":"https://api.github.com/users/Fishrock123/followers","following_url":"https://api.github.com/users/Fishrock123/following{/other_user}","gists_url":"https://api.github.com/users/Fishrock123/gists{/gist_id}","starred_url":"https://api.github.com/users/Fishrock123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fishrock123/subscriptions","organizations_url":"https://api.github.com/users/Fishrock123/orgs","repos_url":"https://api.github.com/users/Fishrock123/repos","events_url":"https://api.github.com/users/Fishrock123/events{/privacy}","received_events_url":"https://api.github.com/users/Fishrock123/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T17:56:37Z","updated_at":"2015-03-25T17:56:37Z","body":"New test:\r\n\r\n```js\r\nvar assert = require('assert');\r\n\r\nsetImmediate(function () {\r\n  var count = 0;\r\n  while (count++ < 1e7) {\r\n    Math.random()\r\n  }\r\n});\r\n\r\nvar i = setTimeout(function () {\r\n  this.unref();\r\n  setImmediate(process.exit);\r\n}, 10);\r\n\r\nprocess.on('exit', function() {\r\n  assert.strictEqual(process._getActiveHandles().length, 0);\r\n});\r\n```\r\n\r\nCurrently I'm not even sure if #1231 manages to fix this."}}