|Synopsis:||Assign a new value to a pointer that points to deallocated memory|
Pointers that point to deallocated memory should either be set to NULL or to other allocated memory to prevent access to the released memory. If a pointer is not set to a new value it results in undefined behavior when it is accidentally used. If a pointer, which is set to NULL, is accidentally used it will result in an exception. Also try to prevent this by limiting the block scope of such invalidated pointers or references.
Exceptions to this rule are smart pointers and in case pointer lifetime ends.
Data members should not have to be reset in destructors.
|Ellemtel Rec. 59|
|ISC++ Rule 8.3|