Mail Archives: djgpp/2000/09/17/08:22:39
Edmund Horner wrote:
>
> Freeing (or deleting, in C++) the NULL pointer is not supposed to be done!
> Some DPMI servers ignore it, and some (such as DJGPP) will cause a SIGSEGV
> (segment violation) -- you're program will crash, and this is what you want
> to happen!
You would be right if free(NULL) or delete NULL call would directly call DPMI.
But that's not true - C and C++ standards specify NULL as an exception, so
free(NULL) does nothing.
Laurynas
- Raw text -