KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I always wondered why automatic setting of the pointer to NULL after delete is not part of the standard. If this gets taken care of then many of the crashes due to an invalid pointer would not occur. But having said that I can think of couple of reasons why the standard would have restricted this: Performance: An additional instruction could slow down the delete performance. Could it be because of const pointers. Then again standard could have done something for this special case I guess. Does anyone know exact reasons for not allowing this?
Tags (comma-separated)
Save Edits
Cancel