S
Songling
Hi gurus,
Just learnt from my co-worker that it's safe to delete a null pointer. I
tried it on sun box
(and linux), nothing bad happens. So it seems to be true. But does it apply
to all platforms?
Also if I delete a pointer twice, and don't nullify the pointer after the
first delete, it's going
to trap. If I do the nullify, no trap. Does it just confirm that it's safe
to delete null pointer?
Btw I ran my test on SunOS 5.8 and Linux 2.4.18-3.
Thanks for your reply!
Songling
Just learnt from my co-worker that it's safe to delete a null pointer. I
tried it on sun box
(and linux), nothing bad happens. So it seems to be true. But does it apply
to all platforms?
Also if I delete a pointer twice, and don't nullify the pointer after the
first delete, it's going
to trap. If I do the nullify, no trap. Does it just confirm that it's safe
to delete null pointer?
Btw I ran my test on SunOS 5.8 and Linux 2.4.18-3.
Thanks for your reply!
Songling