Sometimes it is not possible to know the size of an array before allocating it.
If the programmer wants to avoid the waste of memory using non-shrinkable arrays,
it would be required to create a new array with the correct size and delete the old array after copying its elements.
Note that it is also possible to use other implementations, such as linked lists or some others that allow dynamic size.
On some cases, such as those, on which the arrays have a defined maximum size, its elements must be sequentially aligned and its real size is unknown before the allocation,
it would be useful for the programmer to have standard shrinkable arrays.