+ 1
what is the effect of passing of NULL pointer(0) to delete pointer ? pls ans me
3 Respostas
+ 2
@Srinivas: It's the other way round. First you can delete as the memory the pointer points to is still allocated, then you assign null to the pointer. As the deletion of a null pointer does not lead to any error (no segmentation fault or memory access violation) this is a way to make sure any additional deletes on the same pointer do not produce above mentioned problems.
0
i don't no what you are expected to tell.. i didn't understand this.. thnx
0
@Srinivas: No prob. It's my pleasure. :-)