[#BloombergLP-bdlar-ArrayRef-resize] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlar.adoc[bdlar]::xref:BloombergLP/bdlar/ArrayRef.adoc[ArrayRef]::resize :relfileprefix: ../../../ :mrdocs: Set the size to the specified `newSize`. If `newSize > size()`, then `newSize ‐ size()` elements with default values are appended to the array. If `newSize < size()`, then the `size() ‐ newSize` elements at the end of the array are destroyed. The behavior is undefined unless `0 <= newSize`. == Synopsis Declared in `<bdlar_arrayref.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void resize(int newSize) const; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#