Re: More memory bugs


Subject: Re: More memory bugs
From: Hubert Figuiere (hfiguiere@teaser.fr)
Date: Mon Mar 19 2001 - 13:50:35 CST


According to Dom Lachowicz <cinamod@hotmail.com>:
>
> free() isn't guaranteed to work with NULL, and I'd rather not try to delete
> (or delete[]) anything that is null. If you'd like to give this a try, in

delete works with NULL pointers and does nothing. But it is best to check
the case in case of a broken library that may generate hard to trackdown
bugs.
Ref: C++ Programming Language, 3rd Edition
Bjarne Stroustrup
Page 128
"Applying delete to zero has no effect".

Hub



This archive was generated by hypermail 2b25 : Mon Mar 19 2001 - 13:46:29 CST