[Insight-developers] is operator new returning NULL ?
Williams, Norman K
norman-k-williams at uiowa.edu
Tue Dec 11 08:46:02 EST 2007
I brought that code into ITK from Brains2, and it was written long ago, in a galaxy far far away. I didn't fix anything that wasn't obviously broken.
If you want to get rid of the NULL checks in cases like that, be my guest.
-----Original Message-----
From: insight-developers-bounces+norman-k-williams=uiowa.edu at itk.org on behalf of Mathieu Malaterre
Sent: Tue 12/11/2007 7:18 AM
To: ITK
Subject: [Insight-developers] is operator new returning NULL ?
Hi,
The other day I was reading through some C code ported to C++ in
Code/IO namely the Siemens/GE4/GE5 stuff and found the following piece
of code:
GEImageHeader *hdr = new GEImageHeader;
if(hdr == 0)
{
RAISE_EXCEPTION();
}
AFAIK operator new never returns NULL, but throw an exception...well
on a standard conforming compiler. so the question is: is the code
simply copy/paste from C code or are there some (VS6 ?) buggy compiler
that do not throw exception ?
thanks,
--
Mathieu
_______________________________________________
Insight-developers mailing list
Insight-developers at itk.org
http://www.itk.org/mailman/listinfo/insight-developers
More information about the Insight-developers
mailing list