[Info-vax] BASIC (and Horizon)
Lawrence D'Oliveiro
ldo at nz.invalid
Fri Feb 2 20:48:30 EST 2024
On Fri, 2 Feb 2024 16:43:15 -0500, Stephen Hoffman wrote:
> No, that free ignores a null doesn't simplify the bookkeeping.
It does though, in the code example I have posted elsewhere. You can just
put a sequence of unconditional free(3) calls, which is much shorter than
useless things like
if (ptr)
free(ptr);
which I see all too often.
By the way, the C++ “delete” statement is similarly specified to treat an
attempt to dispose of a NULL pointer as a harmless no-op.
More information about the Info-vax
mailing list