I think this could be something to do with stack vs heap. When you use the new keyword, you're allocating memory on the heap. The previous instance of this object, in your case v is allocated on the stack.

When you use new, you're no longer using the same address as what you've passed in. Therefore, the instance in main is unchanged.

One other thing that should be noted is that you're not freeing the dynamically allocated memory in your function. You have a memory leak.