On Thu, Mar 06, 2003 at 03:25:41PM +0000, José Fonseca wrote: > David, I don't know exactly if that was your point, but of all ways > presented here to avoid catching exceptions with the 'new' operator, > using 'set_new_hander' seems the best. It doesn't requires any include > for every source file where 'new' is used, and also avoids duplicating > the NULL check (already done internally by new) in every allocation. > The only bad thing is that we can't tell when an allocation failed, ^^^^ | Oops! It should had been "where"... --------+
> but the out-of-memory condition shouldn't appear in practice, and I'd > rather have to fire gdb to find that out, than having to write > "if(!(foo = new ..) == NULL) ..." around everywhere. José Fonseca __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com ------------------------------------------------------- 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