Make sure that the content vector is initialised, and that enough space is reserved to minimise
resizing.