In article <rQ*****************@newsfe1-win.ntli.net>,
James Bannon <ja**********@ntlworld.comwrote:
edu.mvk wrote:
Do we need to check for error condition when we use new operator in C++
instead of malloc?
Thanks.
See also the other replies. A more general point however is to ask what
we can really do about it if memory is actually exhausted? Not much I
think other than stop gracefully in the new handler.
Try to be more imaginative. Let's say we are working in a system and at
least two of three different modules have to be in place for the program
to work correctly, the third module is a "nice to have" feature. If
there isn't enough RAM for this third feature, we want the user to still
have the option of continuing without it...