The core problem is the delete statement, it is deleting the pointer we are going to access on the next line. Now, that implementation is naive, it is not exception safe (if the new statement were to throw, we would leave "this" in an inconsistent state).

While a self assignment check solves that case, it doesn't solve the exception safety issue. The following implementation solves both problems:

Because the class you are assigning to (the class you are writing the = operator ) typically you first delete the memory used by your members (if you have members that store their memory on the heap ie use new) and then you allocate new memory for your member variables, and then you copy the rhs member variables' contents in to this...

if rhs is *this then you had previously just deleted all of its members

Actually, "typicaly" one would use the copy-and-swap idiom, because it is both simpler and exception safe, and does not have any problem with self-assignment.

What is warning you about self-assignment probably only applies in the particular scenario you were reading about. In general there is no reason to. Any assignment operator that must check for self-assignment is not exception safe. See the GotW archives.