{"comment":{"url":"https://api.github.com/repos/theopolis/osquery/comments/12964195","html_url":"https://github.com/theopolis/osquery/commit/2765d055c32bdc14a7ecc5a9a95f67d13bcbd4d1#commitcomment-12964195","id":12964195,"user":{"login":"theopolis","id":981645,"avatar_url":"https://avatars.githubusercontent.com/u/981645?v=3","gravatar_id":"","url":"https://api.github.com/users/theopolis","html_url":"https://github.com/theopolis","followers_url":"https://api.github.com/users/theopolis/followers","following_url":"https://api.github.com/users/theopolis/following{/other_user}","gists_url":"https://api.github.com/users/theopolis/gists{/gist_id}","starred_url":"https://api.github.com/users/theopolis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theopolis/subscriptions","organizations_url":"https://api.github.com/users/theopolis/orgs","repos_url":"https://api.github.com/users/theopolis/repos","events_url":"https://api.github.com/users/theopolis/events{/privacy}","received_events_url":"https://api.github.com/users/theopolis/received_events","type":"User","site_admin":false},"position":103,"line":139,"path":"osquery/tables/applications/darwin/browser_plugins.cpp","commit_id":"2765d055c32bdc14a7ecc5a9a95f67d13bcbd4d1","created_at":"2015-08-30T06:48:26Z","updated_at":"2015-08-30T06:48:26Z","body":"IIRC, `erase` and `clear` both do not guarantee removal of the internal buffers. They will reset flags and make the container function as it if were empty but the 'husk' may stick around longer. Scott Meyers's Item 17 in Effective mentions this swap method as a better deletion of the container.  "}}