Say we have a piece of code:
//...
class A
//...
A* myA = new A();
A* myPointerToMyA = myA;
delete myA;
delete myPointerToMyA; // this is wrong, no?
//...
The last line does the exact same thing as the one above it, correct? So I would now be delete
ing an invalid/NULL pointer?
I understand this may be a stupid question, but still, I need some reassurance.