{"action":"created","comment":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls/comments/49395983","id":49395983,"diff_hunk":"@@ -131,9 +132,10 @@ export default class ParseObject {\n   /** Prototype getters / setters **/\n \n   get attributes(): AttributeMap {\n-    return Object.freeze(\n-      ObjectState.estimateAttributes(this.className, this._getStateIdentifier())\n-    );\n+    let attributes = singleInstance ?","path":"src/ParseObject.js","position":25,"original_position":25,"commit_id":"fb1c3979f3a48c2b551751809b722245b61a38fd","original_commit_id":"fb1c3979f3a48c2b551751809b722245b61a38fd","user":{"login":"hallucinogen","id":681920,"avatar_url":"https://avatars.githubusercontent.com/u/681920?v=3","gravatar_id":"","url":"https://api.github.com/users/hallucinogen","html_url":"https://github.com/hallucinogen","followers_url":"https://api.github.com/users/hallucinogen/followers","following_url":"https://api.github.com/users/hallucinogen/following{/other_user}","gists_url":"https://api.github.com/users/hallucinogen/gists{/gist_id}","starred_url":"https://api.github.com/users/hallucinogen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hallucinogen/subscriptions","organizations_url":"https://api.github.com/users/hallucinogen/orgs","repos_url":"https://api.github.com/users/hallucinogen/repos","events_url":"https://api.github.com/users/hallucinogen/events{/privacy}","received_events_url":"https://api.github.com/users/hallucinogen/received_events","type":"User","site_admin":false},"body":"I think it would be better if we abstract this into `InstanceStateController` that can be configured by `CoreManager.js`","created_at":"2016-01-11T23:32:59Z","updated_at":"2016-01-11T23:32:59Z","html_url":"https://github.com/ParsePlatform/Parse-SDK-JS/pull/164#discussion_r49395983","pull_request_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls/164","_links":{"self":{"href":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls/comments/49395983"},"html":{"href":"https://github.com/ParsePlatform/Parse-SDK-JS/pull/164#discussion_r49395983"},"pull_request":{"href":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls/164"}}},"pull_request":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls/164","id":55674356,"html_url":"https://github.com/ParsePlatform/Parse-SDK-JS/pull/164","diff_url":"https://github.com/ParsePlatform/Parse-SDK-JS/pull/164.diff","patch_url":"https://github.com/ParsePlatform/Parse-SDK-JS/pull/164.patch","issue_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/164","number":164,"state":"open","locked":false,"title":"Split ObjectState into utilities and storage implementations","user":{"login":"andrewimm","id":494043,"avatar_url":"https://avatars.githubusercontent.com/u/494043?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewimm","html_url":"https://github.com/andrewimm","followers_url":"https://api.github.com/users/andrewimm/followers","following_url":"https://api.github.com/users/andrewimm/following{/other_user}","gists_url":"https://api.github.com/users/andrewimm/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewimm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewimm/subscriptions","organizations_url":"https://api.github.com/users/andrewimm/orgs","repos_url":"https://api.github.com/users/andrewimm/repos","events_url":"https://api.github.com/users/andrewimm/events{/privacy}","received_events_url":"https://api.github.com/users/andrewimm/received_events","type":"User","site_admin":false},"body":"ObjectState used to both store object data *and* the perform the functionality to mutate it.\r\nNow, to facilitate different behavior between single-instance mode and unique-instance mode, ObjectState simply contains the mutation behavior, independent of how it's stored.\r\nThis PR introduces `SingleInstanceState` and `UniqueInstanceState`, storage layers that are directly accessed by ParseObject, and use ObjectState as a utility.\r\n\r\nThis change is chiefly to prevent the memory leaks reported in #111 \r\n\r\nEssentially, there are 4 pieces:\r\n - Isolation of ObjectState into utility functions that have their data sources passed in\r\n - Implementation of SingleInstanceState and UniqueInstanceState\r\n - Reimplementation of tests for both of these storage systems\r\n - Branching of ParseObject logic to interact with one or the other\r\n\r\nI'll be adding more tests, but things look good for now.","created_at":"2016-01-11T20:37:59Z","updated_at":"2016-01-11T23:32:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd92d85b2bd07daf6d99454f6e6fdcddb6964009","assignee":{"login":"peterdotjs","id":2185784,"avatar_url":"https://avatars.githubusercontent.com/u/2185784?v=3","gravatar_id":"","url":"https://api.github.com/users/peterdotjs","html_url":"https://github.com/peterdotjs","followers_url":"https://api.github.com/users/peterdotjs/followers","following_url":"https://api.github.com/users/peterdotjs/following{/other_user}","gists_url":"https://api.github.com/users/peterdotjs/gists{/gist_id}","starred_url":"https://api.github.com/users/peterdotjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterdotjs/subscriptions","organizations_url":"https://api.github.com/users/peterdotjs/orgs","repos_url":"https://api.github.com/users/peterdotjs/repos","events_url":"https://api.github.com/users/peterdotjs/events{/privacy}","received_events_url":"https://api.github.com/users/peterdotjs/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/milestones/4","html_url":"https://github.com/ParsePlatform/Parse-SDK-JS/milestones/1.7.0","labels_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/milestones/4/labels","id":1484215,"number":4,"title":"1.7.0","description":null,"creator":{"login":"andrewimm","id":494043,"avatar_url":"https://avatars.githubusercontent.com/u/494043?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewimm","html_url":"https://github.com/andrewimm","followers_url":"https://api.github.com/users/andrewimm/followers","following_url":"https://api.github.com/users/andrewimm/following{/other_user}","gists_url":"https://api.github.com/users/andrewimm/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewimm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewimm/subscriptions","organizations_url":"https://api.github.com/users/andrewimm/orgs","repos_url":"https://api.github.com/users/andrewimm/repos","events_url":"https://api.github.com/users/andrewimm/events{/privacy}","received_events_url":"https://api.github.com/users/andrewimm/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":1,"state":"open","created_at":"2016-01-05T07:42:12Z","updated_at":"2016-01-11T20:37:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls/164/commits","review_comments_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls/164/comments","review_comment_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/164/comments","statuses_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/statuses/fb1c3979f3a48c2b551751809b722245b61a38fd","head":{"label":"ParsePlatform:singleinstancestore","ref":"singleinstancestore","sha":"fb1c3979f3a48c2b551751809b722245b61a38fd","user":{"login":"ParsePlatform","id":1294580,"avatar_url":"https://avatars.githubusercontent.com/u/1294580?v=3","gravatar_id":"","url":"https://api.github.com/users/ParsePlatform","html_url":"https://github.com/ParsePlatform","followers_url":"https://api.github.com/users/ParsePlatform/followers","following_url":"https://api.github.com/users/ParsePlatform/following{/other_user}","gists_url":"https://api.github.com/users/ParsePlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/ParsePlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParsePlatform/subscriptions","organizations_url":"https://api.github.com/users/ParsePlatform/orgs","repos_url":"https://api.github.com/users/ParsePlatform/repos","events_url":"https://api.github.com/users/ParsePlatform/events{/privacy}","received_events_url":"https://api.github.com/users/ParsePlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":42541957,"name":"Parse-SDK-JS","full_name":"ParsePlatform/Parse-SDK-JS","owner":{"login":"ParsePlatform","id":1294580,"avatar_url":"https://avatars.githubusercontent.com/u/1294580?v=3","gravatar_id":"","url":"https://api.github.com/users/ParsePlatform","html_url":"https://github.com/ParsePlatform","followers_url":"https://api.github.com/users/ParsePlatform/followers","following_url":"https://api.github.com/users/ParsePlatform/following{/other_user}","gists_url":"https://api.github.com/users/ParsePlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/ParsePlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParsePlatform/subscriptions","organizations_url":"https://api.github.com/users/ParsePlatform/orgs","repos_url":"https://api.github.com/users/ParsePlatform/repos","events_url":"https://api.github.com/users/ParsePlatform/events{/privacy}","received_events_url":"https://api.github.com/users/ParsePlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ParsePlatform/Parse-SDK-JS","description":"Parse SDK for JavaScript","fork":false,"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS","forks_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/forks","keys_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/teams","hooks_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/hooks","issue_events_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/events{/number}","events_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/events","assignees_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/assignees{/user}","branches_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/branches{/branch}","tags_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/tags","blobs_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/git/refs{/sha}","trees_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/statuses/{sha}","languages_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/languages","stargazers_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/stargazers","contributors_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/contributors","subscribers_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/subscribers","subscription_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/subscription","commits_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/commits{/sha}","git_commits_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/git/commits{/sha}","comments_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/comments{/number}","issue_comment_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/comments{/number}","contents_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/contents/{+path}","compare_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/merges","archive_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/downloads","issues_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues{/number}","pulls_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls{/number}","milestones_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/milestones{/number}","notifications_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/labels{/name}","releases_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/releases{/id}","created_at":"2015-09-15T19:36:29Z","updated_at":"2016-01-09T02:33:53Z","pushed_at":"2016-01-11T23:19:56Z","git_url":"git://github.com/ParsePlatform/Parse-SDK-JS.git","ssh_url":"git@github.com:ParsePlatform/Parse-SDK-JS.git","clone_url":"https://github.com/ParsePlatform/Parse-SDK-JS.git","svn_url":"https://github.com/ParsePlatform/Parse-SDK-JS","homepage":"https://parse.com","size":344,"stargazers_count":207,"watchers_count":207,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":29,"forks":44,"open_issues":29,"watchers":207,"default_branch":"master"}},"base":{"label":"ParsePlatform:release-1.7.0","ref":"release-1.7.0","sha":"7da2856b18ca1672766612700139757300ecbf62","user":{"login":"ParsePlatform","id":1294580,"avatar_url":"https://avatars.githubusercontent.com/u/1294580?v=3","gravatar_id":"","url":"https://api.github.com/users/ParsePlatform","html_url":"https://github.com/ParsePlatform","followers_url":"https://api.github.com/users/ParsePlatform/followers","following_url":"https://api.github.com/users/ParsePlatform/following{/other_user}","gists_url":"https://api.github.com/users/ParsePlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/ParsePlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParsePlatform/subscriptions","organizations_url":"https://api.github.com/users/ParsePlatform/orgs","repos_url":"https://api.github.com/users/ParsePlatform/repos","events_url":"https://api.github.com/users/ParsePlatform/events{/privacy}","received_events_url":"https://api.github.com/users/ParsePlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":42541957,"name":"Parse-SDK-JS","full_name":"ParsePlatform/Parse-SDK-JS","owner":{"login":"ParsePlatform","id":1294580,"avatar_url":"https://avatars.githubusercontent.com/u/1294580?v=3","gravatar_id":"","url":"https://api.github.com/users/ParsePlatform","html_url":"https://github.com/ParsePlatform","followers_url":"https://api.github.com/users/ParsePlatform/followers","following_url":"https://api.github.com/users/ParsePlatform/following{/other_user}","gists_url":"https://api.github.com/users/ParsePlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/ParsePlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParsePlatform/subscriptions","organizations_url":"https://api.github.com/users/ParsePlatform/orgs","repos_url":"https://api.github.com/users/ParsePlatform/repos","events_url":"https://api.github.com/users/ParsePlatform/events{/privacy}","received_events_url":"https://api.github.com/users/ParsePlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ParsePlatform/Parse-SDK-JS","description":"Parse SDK for JavaScript","fork":false,"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS","forks_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/forks","keys_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/teams","hooks_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/hooks","issue_events_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/events{/number}","events_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/events","assignees_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/assignees{/user}","branches_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/branches{/branch}","tags_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/tags","blobs_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/git/refs{/sha}","trees_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/statuses/{sha}","languages_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/languages","stargazers_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/stargazers","contributors_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/contributors","subscribers_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/subscribers","subscription_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/subscription","commits_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/commits{/sha}","git_commits_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/git/commits{/sha}","comments_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/comments{/number}","issue_comment_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/comments{/number}","contents_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/contents/{+path}","compare_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/merges","archive_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/downloads","issues_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues{/number}","pulls_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls{/number}","milestones_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/milestones{/number}","notifications_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/labels{/name}","releases_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/releases{/id}","created_at":"2015-09-15T19:36:29Z","updated_at":"2016-01-09T02:33:53Z","pushed_at":"2016-01-11T23:19:56Z","git_url":"git://github.com/ParsePlatform/Parse-SDK-JS.git","ssh_url":"git@github.com:ParsePlatform/Parse-SDK-JS.git","clone_url":"https://github.com/ParsePlatform/Parse-SDK-JS.git","svn_url":"https://github.com/ParsePlatform/Parse-SDK-JS","homepage":"https://parse.com","size":344,"stargazers_count":207,"watchers_count":207,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":29,"forks":44,"open_issues":29,"watchers":207,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls/164"},"html":{"href":"https://github.com/ParsePlatform/Parse-SDK-JS/pull/164"},"issue":{"href":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/164"},"comments":{"href":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/164/comments"},"review_comments":{"href":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls/164/comments"},"review_comment":{"href":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/pulls/164/commits"},"statuses":{"href":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/statuses/fb1c3979f3a48c2b551751809b722245b61a38fd"}}}}