Possible Duplicate:
Why doesn't delete set the pointer to NULL?
Is there any purpose for a pointer to deallocated memory?
C++ does exactly what you tell it to do. You didn't set the pointer to null, you deleted the memory that the pointer is pointing to.
Why would you waste the extra step of setting it to null (for performance reasons), if you didn't need to?
What if it's a const pointer?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With