{"action":"created","comment":{"url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls/comments/32130427","id":32130427,"diff_hunk":"@@ -173,13 +173,15 @@ dafBase::Citizen::memId dafBase::Citizen::_addCitizen(Citizen const* c) {\n dafBase::Citizen::Citizen(std::type_info const& type) :\n     _sentinel(magicSentinel),\n     _CitizenId(_addCitizen(this)),\n-    _typeName(type.name()) {\n+    _typeName(type.name()),\n+    _memoryUse(0) {\n }\n \n dafBase::Citizen::Citizen(Citizen const& citizen) :\n     _sentinel(magicSentinel),\n     _CitizenId(_addCitizen(this)),\n-    _typeName(citizen._typeName) {\n+    _typeName(citizen._typeName),\n+    _memoryUse(citizen._memoryUse) {","path":"src/Citizen.cc","position":14,"original_position":14,"commit_id":"f6ead41f3c93c3db41d69025200bcbac884d6ebf","original_commit_id":"f6ead41f3c93c3db41d69025200bcbac884d6ebf","user":{"login":"TallJimbo","id":1330720,"avatar_url":"https://avatars.githubusercontent.com/u/1330720?v=3","gravatar_id":"","url":"https://api.github.com/users/TallJimbo","html_url":"https://github.com/TallJimbo","followers_url":"https://api.github.com/users/TallJimbo/followers","following_url":"https://api.github.com/users/TallJimbo/following{/other_user}","gists_url":"https://api.github.com/users/TallJimbo/gists{/gist_id}","starred_url":"https://api.github.com/users/TallJimbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TallJimbo/subscriptions","organizations_url":"https://api.github.com/users/TallJimbo/orgs","repos_url":"https://api.github.com/users/TallJimbo/repos","events_url":"https://api.github.com/users/TallJimbo/events{/privacy}","received_events_url":"https://api.github.com/users/TallJimbo/received_events","type":"User","site_admin":false},"body":"I don't think this will do what we want in the all-important case of `Image`: this assumes the copy-constructor does a deep copy of all memory, while in most cases for `Image` it will do a shallow copy.  The result is that `Citizen` will think we're using more memory than we are.\r\n\r\nThe only way I can think of to resolve this is to take away `Citizen`'s copy constructor, providing instead one that requires subclasses to specify what to do with the memory use tracker.  That will in turn disable compiler-provided copy constructor of all `Citizen` subclasses, which is sufficiently intrusive that I'm now wondering whether this is still worthwhile.","created_at":"2015-06-10T15:32:19Z","updated_at":"2015-06-10T15:32:19Z","html_url":"https://github.com/HyperSuprime-Cam/daf_base/pull/1#discussion_r32130427","pull_request_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls/comments/32130427"},"html":{"href":"https://github.com/HyperSuprime-Cam/daf_base/pull/1#discussion_r32130427"},"pull_request":{"href":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls/1","id":37370530,"html_url":"https://github.com/HyperSuprime-Cam/daf_base/pull/1","diff_url":"https://github.com/HyperSuprime-Cam/daf_base/pull/1.diff","patch_url":"https://github.com/HyperSuprime-Cam/daf_base/pull/1.patch","issue_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/issues/1","number":1,"state":"open","locked":false,"title":"daf_base review of HSC-1271: improvements to Citizen","user":{"login":"TallJimbo","id":1330720,"avatar_url":"https://avatars.githubusercontent.com/u/1330720?v=3","gravatar_id":"","url":"https://api.github.com/users/TallJimbo","html_url":"https://github.com/TallJimbo","followers_url":"https://api.github.com/users/TallJimbo/followers","following_url":"https://api.github.com/users/TallJimbo/following{/other_user}","gists_url":"https://api.github.com/users/TallJimbo/gists{/gist_id}","starred_url":"https://api.github.com/users/TallJimbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TallJimbo/subscriptions","organizations_url":"https://api.github.com/users/TallJimbo/orgs","repos_url":"https://api.github.com/users/TallJimbo/repos","events_url":"https://api.github.com/users/TallJimbo/events{/privacy}","received_events_url":"https://api.github.com/users/TallJimbo/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-10T15:21:17Z","updated_at":"2015-06-10T15:32:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f92ae7652f3ff4a027ca95203779680bf8c8a3ef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls/1/commits","review_comments_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls/1/comments","review_comment_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/issues/1/comments","statuses_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/statuses/f6ead41f3c93c3db41d69025200bcbac884d6ebf","head":{"label":"HyperSuprime-Cam:tickets/HSC-1271","ref":"tickets/HSC-1271","sha":"f6ead41f3c93c3db41d69025200bcbac884d6ebf","user":{"login":"HyperSuprime-Cam","id":6607948,"avatar_url":"https://avatars.githubusercontent.com/u/6607948?v=3","gravatar_id":"","url":"https://api.github.com/users/HyperSuprime-Cam","html_url":"https://github.com/HyperSuprime-Cam","followers_url":"https://api.github.com/users/HyperSuprime-Cam/followers","following_url":"https://api.github.com/users/HyperSuprime-Cam/following{/other_user}","gists_url":"https://api.github.com/users/HyperSuprime-Cam/gists{/gist_id}","starred_url":"https://api.github.com/users/HyperSuprime-Cam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyperSuprime-Cam/subscriptions","organizations_url":"https://api.github.com/users/HyperSuprime-Cam/orgs","repos_url":"https://api.github.com/users/HyperSuprime-Cam/repos","events_url":"https://api.github.com/users/HyperSuprime-Cam/events{/privacy}","received_events_url":"https://api.github.com/users/HyperSuprime-Cam/received_events","type":"Organization","site_admin":false},"repo":{"id":16705516,"name":"daf_base","full_name":"HyperSuprime-Cam/daf_base","owner":{"login":"HyperSuprime-Cam","id":6607948,"avatar_url":"https://avatars.githubusercontent.com/u/6607948?v=3","gravatar_id":"","url":"https://api.github.com/users/HyperSuprime-Cam","html_url":"https://github.com/HyperSuprime-Cam","followers_url":"https://api.github.com/users/HyperSuprime-Cam/followers","following_url":"https://api.github.com/users/HyperSuprime-Cam/following{/other_user}","gists_url":"https://api.github.com/users/HyperSuprime-Cam/gists{/gist_id}","starred_url":"https://api.github.com/users/HyperSuprime-Cam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyperSuprime-Cam/subscriptions","organizations_url":"https://api.github.com/users/HyperSuprime-Cam/orgs","repos_url":"https://api.github.com/users/HyperSuprime-Cam/repos","events_url":"https://api.github.com/users/HyperSuprime-Cam/events{/privacy}","received_events_url":"https://api.github.com/users/HyperSuprime-Cam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HyperSuprime-Cam/daf_base","description":"","fork":false,"url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base","forks_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/forks","keys_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/teams","hooks_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/hooks","issue_events_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/issues/events{/number}","events_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/events","assignees_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/assignees{/user}","branches_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/branches{/branch}","tags_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/tags","blobs_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/git/refs{/sha}","trees_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/statuses/{sha}","languages_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/languages","stargazers_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/stargazers","contributors_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/contributors","subscribers_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/subscribers","subscription_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/subscription","commits_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/commits{/sha}","git_commits_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/git/commits{/sha}","comments_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/comments{/number}","issue_comment_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/issues/comments{/number}","contents_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/contents/{+path}","compare_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/merges","archive_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/downloads","issues_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/issues{/number}","pulls_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls{/number}","milestones_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/milestones{/number}","notifications_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/labels{/name}","releases_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/releases{/id}","created_at":"2014-02-10T18:55:31Z","updated_at":"2015-05-22T19:02:19Z","pushed_at":"2015-06-10T15:21:17Z","git_url":"git://github.com/HyperSuprime-Cam/daf_base.git","ssh_url":"git@github.com:HyperSuprime-Cam/daf_base.git","clone_url":"https://github.com/HyperSuprime-Cam/daf_base.git","svn_url":"https://github.com/HyperSuprime-Cam/daf_base","homepage":null,"size":1108,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"HyperSuprime-Cam:master","ref":"master","sha":"1df8a21aa50e46005ad8f936631577ebc6e8ec04","user":{"login":"HyperSuprime-Cam","id":6607948,"avatar_url":"https://avatars.githubusercontent.com/u/6607948?v=3","gravatar_id":"","url":"https://api.github.com/users/HyperSuprime-Cam","html_url":"https://github.com/HyperSuprime-Cam","followers_url":"https://api.github.com/users/HyperSuprime-Cam/followers","following_url":"https://api.github.com/users/HyperSuprime-Cam/following{/other_user}","gists_url":"https://api.github.com/users/HyperSuprime-Cam/gists{/gist_id}","starred_url":"https://api.github.com/users/HyperSuprime-Cam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyperSuprime-Cam/subscriptions","organizations_url":"https://api.github.com/users/HyperSuprime-Cam/orgs","repos_url":"https://api.github.com/users/HyperSuprime-Cam/repos","events_url":"https://api.github.com/users/HyperSuprime-Cam/events{/privacy}","received_events_url":"https://api.github.com/users/HyperSuprime-Cam/received_events","type":"Organization","site_admin":false},"repo":{"id":16705516,"name":"daf_base","full_name":"HyperSuprime-Cam/daf_base","owner":{"login":"HyperSuprime-Cam","id":6607948,"avatar_url":"https://avatars.githubusercontent.com/u/6607948?v=3","gravatar_id":"","url":"https://api.github.com/users/HyperSuprime-Cam","html_url":"https://github.com/HyperSuprime-Cam","followers_url":"https://api.github.com/users/HyperSuprime-Cam/followers","following_url":"https://api.github.com/users/HyperSuprime-Cam/following{/other_user}","gists_url":"https://api.github.com/users/HyperSuprime-Cam/gists{/gist_id}","starred_url":"https://api.github.com/users/HyperSuprime-Cam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyperSuprime-Cam/subscriptions","organizations_url":"https://api.github.com/users/HyperSuprime-Cam/orgs","repos_url":"https://api.github.com/users/HyperSuprime-Cam/repos","events_url":"https://api.github.com/users/HyperSuprime-Cam/events{/privacy}","received_events_url":"https://api.github.com/users/HyperSuprime-Cam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HyperSuprime-Cam/daf_base","description":"","fork":false,"url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base","forks_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/forks","keys_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/teams","hooks_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/hooks","issue_events_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/issues/events{/number}","events_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/events","assignees_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/assignees{/user}","branches_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/branches{/branch}","tags_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/tags","blobs_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/git/refs{/sha}","trees_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/statuses/{sha}","languages_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/languages","stargazers_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/stargazers","contributors_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/contributors","subscribers_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/subscribers","subscription_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/subscription","commits_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/commits{/sha}","git_commits_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/git/commits{/sha}","comments_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/comments{/number}","issue_comment_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/issues/comments{/number}","contents_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/contents/{+path}","compare_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/merges","archive_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/downloads","issues_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/issues{/number}","pulls_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls{/number}","milestones_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/milestones{/number}","notifications_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/labels{/name}","releases_url":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/releases{/id}","created_at":"2014-02-10T18:55:31Z","updated_at":"2015-05-22T19:02:19Z","pushed_at":"2015-06-10T15:21:17Z","git_url":"git://github.com/HyperSuprime-Cam/daf_base.git","ssh_url":"git@github.com:HyperSuprime-Cam/daf_base.git","clone_url":"https://github.com/HyperSuprime-Cam/daf_base.git","svn_url":"https://github.com/HyperSuprime-Cam/daf_base","homepage":null,"size":1108,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls/1"},"html":{"href":"https://github.com/HyperSuprime-Cam/daf_base/pull/1"},"issue":{"href":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/issues/1"},"comments":{"href":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/HyperSuprime-Cam/daf_base/statuses/f6ead41f3c93c3db41d69025200bcbac884d6ebf"}}}}