Any reasons why this can not be standard behavior of free()
?
multiple pointers pointing to the same object:
#include
#i
Bjarne Stroustrup discussing whether the delete operator should zero its operand. It's not the free() function, but it's a good discussion anyway. Consider points like:
He also says it was intended but never happened with operator delete
:
C++ explicitly allows an implementation of delete to zero out an lvalue operand, and I had hoped that implementations would do that, but that idea doesn't seem to have become popular with implementers.