Is it necessary to make pointer NULL
when the pointer is no more in use. For example
Foo *foo=new Foo();
//code to be processed by pointer foo
/*end of code*/
delete foo;
foo=NULL; //the point which i am asking
My questions are:
- What kind of effects i.e., good or bad it can cause to the program?
- What will happen if we don't use this?
Thanks in advance for clearing my points.