The first one is a waste of resources. You're passing it a pointer. Try to think of this as passing the pointer by value. A copy of the address of the string where you want to copy this->name to is sent to the function. This means that name1 points to some block of memory.
Now when the function starts, you assign name1 to point to some other random block of memory through new, and you copy this->name to it, but then you delete the memory. Why? name1 is no longer valid, and on top of it, the original pointer you passed it to has not been updated with the value.
I'm curious as to why you're not using C++ strings. Assuming you're not able to use them (ie. an assignment won't let you), the proper way to do something like this, would be to write a function with something similar to one of the following prototypes:
Code:
char *copy(void); /* returns a dynamically created char * using new */
Code:
void copy(char **); /* Alters what the parameter points to, and copies to it*/
Code:
void copy(char *, size_t); /* Copies the string up to the amount of specified chars to the string passed */