Hello everyone,
I usually check whether there is bad_alloc thrown to identify whether the allocation is success or not.
My question is,
Is there a way to disable bad_alloc and just to check the returned pointer NULL or not to identify allocation success or not -- which from function point of view, is as correct as the way to catch bad_alloc? Windows platform/Visual Studio is ok. I always see code does not check bad_alloc and just check the return pointer.
(My solution is to select Enable C++ Exception to No in Code Generation option in Visual Studio, not sure whether it is the most correct way.)
thanks in advance,
George