I think this will fail if the new size is smaller than the current one. Could be checked with an assert (private methods).