Don't use the user-supplied cap as starting point for a resize. Doing so overallocates memory and thus negates the whole point of specifying a precise cap value.
Don't use the user-supplied cap as starting point for a resize. Doing so overallocates memory and thus negates the whole point of specifying a precise cap value.