[#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`&period; If `newSize &gt; size()`, then `newSize &hyphen; size()` elements with default values are appended to the array&period; If `newSize &lt; size()`, then the `size() &hyphen; newSize` elements at the end of the array are destroyed&period; The behavior is undefined unless `0 &lt;&equals; newSize`&period;

== Synopsis

Declared in `&lt;bdlar&lowbar;arrayref&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
resize(int newSize) const;
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
