It's common that you'll see the following two lines in C++ code: delete p; p = nullptr; How about allowing it as follows? delete p = nulltpr;