Err, well, that is to say, store your array in a temporary one, delete the old array, and then reassign a larger array. When you finish copying from the temporary to the new array, delete the temporary.