While copy-assignment of a pointer is certainly faster than a memory deallocation and possibly a destructor call, the examples are not equivalent. I am having a hard time coming up with context in which the synchronization in the second example does anything useful.
Thanks Galik, you're right there is no point setting tempData to zero.
Thanks to both of you, I suppose the root question was "Is copy assignemnt faster than memory deallocation?", which it seems it is.