{"action":"created","comment":{"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/comments/22993586","id":22993586,"diff_hunk":"@@ -408,7 +389,14 @@ var Trivia = (function () {\n \n \treturn {","path":"chat-plugins/trivia.js","position":145,"original_position":145,"commit_id":"55f9e16ffde26cf2f74217c85a42db5c4ceee99f","original_commit_id":"55f9e16ffde26cf2f74217c85a42db5c4ceee99f","user":{"login":"Morfent","id":6477435,"avatar_url":"https://avatars.githubusercontent.com/u/6477435?v=3","gravatar_id":"","url":"https://api.github.com/users/Morfent","html_url":"https://github.com/Morfent","followers_url":"https://api.github.com/users/Morfent/followers","following_url":"https://api.github.com/users/Morfent/following{/other_user}","gists_url":"https://api.github.com/users/Morfent/gists{/gist_id}","starred_url":"https://api.github.com/users/Morfent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morfent/subscriptions","organizations_url":"https://api.github.com/users/Morfent/orgs","repos_url":"https://api.github.com/users/Morfent/repos","events_url":"https://api.github.com/users/Morfent/events{/privacy}","received_events_url":"https://api.github.com/users/Morfent/received_events","type":"User","site_admin":false},"body":"``getInstance``'s job is to avoid having to create the Trivia object until it is first needed, then return the cached instance afterwards when its methods are needed instead of having to call the instance's constructor every time, or to immediately create an instance at runtime and return that every time. ","created_at":"2015-01-15T07:04:37Z","updated_at":"2015-01-15T07:04:37Z","html_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1408#discussion_r22993586","pull_request_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1408","_links":{"self":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/comments/22993586"},"html":{"href":"https://github.com/Zarel/Pokemon-Showdown/pull/1408#discussion_r22993586"},"pull_request":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1408"}}},"pull_request":{"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1408","id":27159357,"html_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1408","diff_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1408.diff","patch_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1408.patch","issue_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1408","number":1408,"state":"open","locked":false,"title":"Trivia plugin: prevent GC from breaking games","user":{"login":"Morfent","id":6477435,"avatar_url":"https://avatars.githubusercontent.com/u/6477435?v=3","gravatar_id":"","url":"https://api.github.com/users/Morfent","html_url":"https://github.com/Morfent","followers_url":"https://api.github.com/users/Morfent/followers","following_url":"https://api.github.com/users/Morfent/following{/other_user}","gists_url":"https://api.github.com/users/Morfent/gists{/gist_id}","starred_url":"https://api.github.com/users/Morfent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morfent/subscriptions","organizations_url":"https://api.github.com/users/Morfent/orgs","repos_url":"https://api.github.com/users/Morfent/repos","events_url":"https://api.github.com/users/Morfent/events{/privacy}","received_events_url":"https://api.github.com/users/Morfent/received_events","type":"User","site_admin":false},"body":"Create new Trivia instances on signups, delete them on game end, and\r\nkeep a reference to them in their constructor so that ongoing games are\r\nno longer considered \"dead\" during garbage collection now that they have\r\na reference to them in a \"live\" object.\r\n\r\nAlso make the question timeouts less overcomplicated, now that I know the broken looping wasn't caused by them.","created_at":"2015-01-11T06:12:07Z","updated_at":"2015-01-15T07:04:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"28ef1a3784ea421126c274c83eaddb7f22da9d07","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1408/commits","review_comments_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1408/comments","review_comment_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1408/comments","statuses_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/statuses/55f9e16ffde26cf2f74217c85a42db5c4ceee99f","head":{"label":"Morfent:trivia","ref":"trivia","sha":"55f9e16ffde26cf2f74217c85a42db5c4ceee99f","user":{"login":"Morfent","id":6477435,"avatar_url":"https://avatars.githubusercontent.com/u/6477435?v=3","gravatar_id":"","url":"https://api.github.com/users/Morfent","html_url":"https://github.com/Morfent","followers_url":"https://api.github.com/users/Morfent/followers","following_url":"https://api.github.com/users/Morfent/following{/other_user}","gists_url":"https://api.github.com/users/Morfent/gists{/gist_id}","starred_url":"https://api.github.com/users/Morfent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morfent/subscriptions","organizations_url":"https://api.github.com/users/Morfent/orgs","repos_url":"https://api.github.com/users/Morfent/repos","events_url":"https://api.github.com/users/Morfent/events{/privacy}","received_events_url":"https://api.github.com/users/Morfent/received_events","type":"User","site_admin":false},"repo":{"id":16159065,"name":"Pokemon-Showdown","full_name":"Morfent/Pokemon-Showdown","owner":{"login":"Morfent","id":6477435,"avatar_url":"https://avatars.githubusercontent.com/u/6477435?v=3","gravatar_id":"","url":"https://api.github.com/users/Morfent","html_url":"https://github.com/Morfent","followers_url":"https://api.github.com/users/Morfent/followers","following_url":"https://api.github.com/users/Morfent/following{/other_user}","gists_url":"https://api.github.com/users/Morfent/gists{/gist_id}","starred_url":"https://api.github.com/users/Morfent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morfent/subscriptions","organizations_url":"https://api.github.com/users/Morfent/orgs","repos_url":"https://api.github.com/users/Morfent/repos","events_url":"https://api.github.com/users/Morfent/events{/privacy}","received_events_url":"https://api.github.com/users/Morfent/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Morfent/Pokemon-Showdown","description":"Pokémon battle simulator.","fork":true,"url":"https://api.github.com/repos/Morfent/Pokemon-Showdown","forks_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/forks","keys_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/teams","hooks_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/hooks","issue_events_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/issues/events{/number}","events_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/events","assignees_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/assignees{/user}","branches_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/branches{/branch}","tags_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/tags","blobs_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/git/refs{/sha}","trees_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/statuses/{sha}","languages_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/languages","stargazers_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/stargazers","contributors_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/contributors","subscribers_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/subscribers","subscription_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/subscription","commits_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/commits{/sha}","git_commits_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/git/commits{/sha}","comments_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/comments{/number}","issue_comment_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/issues/comments/{number}","contents_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/contents/{+path}","compare_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/merges","archive_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/downloads","issues_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/issues{/number}","pulls_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/pulls{/number}","milestones_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/milestones{/number}","notifications_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/labels{/name}","releases_url":"https://api.github.com/repos/Morfent/Pokemon-Showdown/releases{/id}","created_at":"2014-01-23T01:56:02Z","updated_at":"2014-12-24T19:18:18Z","pushed_at":"2015-01-12T19:33:30Z","git_url":"git://github.com/Morfent/Pokemon-Showdown.git","ssh_url":"git@github.com:Morfent/Pokemon-Showdown.git","clone_url":"https://github.com/Morfent/Pokemon-Showdown.git","svn_url":"https://github.com/Morfent/Pokemon-Showdown","homepage":"http://pokemonshowdown.com","size":29799,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"Zarel:master","ref":"master","sha":"45b063db54214392b0a97327cb71b08de1827214","user":{"login":"Zarel","id":551184,"avatar_url":"https://avatars.githubusercontent.com/u/551184?v=3","gravatar_id":"","url":"https://api.github.com/users/Zarel","html_url":"https://github.com/Zarel","followers_url":"https://api.github.com/users/Zarel/followers","following_url":"https://api.github.com/users/Zarel/following{/other_user}","gists_url":"https://api.github.com/users/Zarel/gists{/gist_id}","starred_url":"https://api.github.com/users/Zarel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zarel/subscriptions","organizations_url":"https://api.github.com/users/Zarel/orgs","repos_url":"https://api.github.com/users/Zarel/repos","events_url":"https://api.github.com/users/Zarel/events{/privacy}","received_events_url":"https://api.github.com/users/Zarel/received_events","type":"User","site_admin":false},"repo":{"id":3038446,"name":"Pokemon-Showdown","full_name":"Zarel/Pokemon-Showdown","owner":{"login":"Zarel","id":551184,"avatar_url":"https://avatars.githubusercontent.com/u/551184?v=3","gravatar_id":"","url":"https://api.github.com/users/Zarel","html_url":"https://github.com/Zarel","followers_url":"https://api.github.com/users/Zarel/followers","following_url":"https://api.github.com/users/Zarel/following{/other_user}","gists_url":"https://api.github.com/users/Zarel/gists{/gist_id}","starred_url":"https://api.github.com/users/Zarel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zarel/subscriptions","organizations_url":"https://api.github.com/users/Zarel/orgs","repos_url":"https://api.github.com/users/Zarel/repos","events_url":"https://api.github.com/users/Zarel/events{/privacy}","received_events_url":"https://api.github.com/users/Zarel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zarel/Pokemon-Showdown","description":"Pokémon battle simulator.","fork":false,"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown","forks_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/forks","keys_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/teams","hooks_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/hooks","issue_events_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/events{/number}","events_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/events","assignees_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/assignees{/user}","branches_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/branches{/branch}","tags_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/tags","blobs_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/statuses/{sha}","languages_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/languages","stargazers_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/stargazers","contributors_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/contributors","subscribers_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/subscribers","subscription_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/subscription","commits_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/comments/{number}","contents_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/contents/{+path}","compare_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/merges","archive_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/downloads","issues_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues{/number}","pulls_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls{/number}","milestones_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/milestones{/number}","notifications_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/labels{/name}","releases_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/releases{/id}","created_at":"2011-12-23T04:52:33Z","updated_at":"2015-01-15T02:48:01Z","pushed_at":"2015-01-15T02:48:00Z","git_url":"git://github.com/Zarel/Pokemon-Showdown.git","ssh_url":"git@github.com:Zarel/Pokemon-Showdown.git","clone_url":"https://github.com/Zarel/Pokemon-Showdown.git","svn_url":"https://github.com/Zarel/Pokemon-Showdown","homepage":"http://pokemonshowdown.com","size":53958,"stargazers_count":436,"watchers_count":436,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":579,"mirror_url":null,"open_issues_count":23,"forks":579,"open_issues":23,"watchers":436,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1408"},"html":{"href":"https://github.com/Zarel/Pokemon-Showdown/pull/1408"},"issue":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1408"},"comments":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1408/comments"},"review_comments":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1408/comments"},"review_comment":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1408/commits"},"statuses":{"href":"https://api.github.com/repos/Zarel/Pokemon-Showdown/statuses/55f9e16ffde26cf2f74217c85a42db5c4ceee99f"}}}}