[Insight-developers] VC++ new and bad_alloc exception
Miller, James V (Research)
millerjv at crd . ge . com
Mon, 3 Jun 2002 09:02:57 -0400
Luis,
What do you plan to do if an alloc fails?
There is very little opportunity to recover.
Jim
-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez@kitware.com]
Sent: Saturday, June 01, 2002 10:43 PM
To: insight-developers@public.kitware.com
Subject: [Insight-developers] VC++ new and bad_alloc exception
Hi,
Just for the record:
The implementation of "new" on VC++ doesn't throw
(as it should) a bad_alloc exception when it fails
to allocate the requested amount of memory:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q167733
Microsoft recomends to replace the default error handler routine
with a customized one that will throw the exception for you :-)
We may want to add this in our itkWin32.h header and/or
somewhere in the itk Factories...
Luis
_______________________________________________
Insight-developers mailing list
Insight-developers@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers