Linus Torvalds wrote:

Also note that if you don't allow exceptions (which I would _strongly_ encourage), you can't really use "new" - unless you think it's ok to SIGSEGV under low-mem circumstances. Which it might be, of course, in some situations.


I do embedded C++ using GCC for a living - operator new() will return a NULL if the object cannot be created, unless you use set_new_hander() to proved a callback for OOM conditions. Then, it will call your handler function first.


I don't find it very onerous in my coding to say
foo = new thing;
if (!foo)
   ....






-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to