Use this method in the same way as its C or C++ counterpart to reallocate memory that was previously allocated.