[haiku-commits] Re: BRANCH midar-github.master - src/preferences/bluetooth src/servers/app src/kits/tracker src/add-ons/screen_savers/message headers/os/support

  • From: Jonathan Schleifer <js-haiku-commits@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 20 Nov 2012 12:39:55 +0100

Am 20.11.2012 um 09:22 schrieb Ingo Weinhold:

> As written before, in critical servers this is a no-go. Either catch the 
> exception or allocate the array on the heap with new(std::nothrow). The TODO 
> can be removed, BTW.

Honestly, I don't really see the problem. If new fails, this means we are out 
of virtual address space. If that happens, it will crash anyway. And even then 
it's better it terminates using an uncaught exception than to segfault, isn't 
it? ;)

Or am I missing something and new behaves completely different in Haiku?

--
Jonathan

Other related posts: