To return the memory in our dynamic array example: delete []v; C++ will free all the memory allocated for v.
delete []v;