Can't you just do `memcpy` + `memset` instead of allocating, reallocating and destroying an extra object?