{"action":"created","issue":{"url":"https://api.github.com/repos/lefticus/cppbestpractices/issues/15","labels_url":"https://api.github.com/repos/lefticus/cppbestpractices/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/lefticus/cppbestpractices/issues/15/comments","events_url":"https://api.github.com/repos/lefticus/cppbestpractices/issues/15/events","html_url":"https://github.com/lefticus/cppbestpractices/issues/15","id":82972982,"number":15,"title":"Addition for section \"Avoid Raw Memory Access\"","user":{"login":"theta682","id":1522049,"avatar_url":"https://avatars.githubusercontent.com/u/1522049?v=3","gravatar_id":"","url":"https://api.github.com/users/theta682","html_url":"https://github.com/theta682","followers_url":"https://api.github.com/users/theta682/followers","following_url":"https://api.github.com/users/theta682/following{/other_user}","gists_url":"https://api.github.com/users/theta682/gists{/gist_id}","starred_url":"https://api.github.com/users/theta682/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theta682/subscriptions","organizations_url":"https://api.github.com/users/theta682/orgs","repos_url":"https://api.github.com/users/theta682/repos","events_url":"https://api.github.com/users/theta682/events{/privacy}","received_events_url":"https://api.github.com/users/theta682/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-31T02:21:29Z","updated_at":"2015-06-09T01:21:36Z","closed_at":"2015-06-08T16:23:12Z","body":"In section \"Avoid Raw Memory Access\" using of std::unique_ptr can be added for arrays:\r\n\r\n```cpp\r\nauto my_data = std::make_unique<MyDataClass>(128);\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/lefticus/cppbestpractices/issues/comments/110188878","html_url":"https://github.com/lefticus/cppbestpractices/issues/15#issuecomment-110188878","issue_url":"https://api.github.com/repos/lefticus/cppbestpractices/issues/15","id":110188878,"user":{"login":"theta682","id":1522049,"avatar_url":"https://avatars.githubusercontent.com/u/1522049?v=3","gravatar_id":"","url":"https://api.github.com/users/theta682","html_url":"https://github.com/theta682","followers_url":"https://api.github.com/users/theta682/followers","following_url":"https://api.github.com/users/theta682/following{/other_user}","gists_url":"https://api.github.com/users/theta682/gists{/gist_id}","starred_url":"https://api.github.com/users/theta682/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theta682/subscriptions","organizations_url":"https://api.github.com/users/theta682/orgs","repos_url":"https://api.github.com/users/theta682/repos","events_url":"https://api.github.com/users/theta682/events{/privacy}","received_events_url":"https://api.github.com/users/theta682/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T01:21:36Z","updated_at":"2015-06-09T01:21:36Z","body":"`std::array` allocates data on stack. This means that it can't have megabytes of data. `std::vector` is too heavy for buffers which don't have to be resized."}}