From this question
Shortest and best way to "reinitialize"/clean a class instance
The answer to "Shortest and best way to “reinitialize”/clean a class instance" is
myUsedInstance = myClass();
Now my question is: Is it guaranteed that the memory address is the same after re-initializing? That is, if I have a pointer myClass*
that points to myUsedInstance
, will that pointer correctly point to the newly initialized object or is there anything I have to be careful of?