TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: KURT KUZBA
from: CAMERON CLARK
date: 1997-04-24 17:50:00
subject: Re: self-destruct

KK>    Doesn't new already return NULL, or 0, on failure?
KK> It does in VC++ 4.0.
KK> Borland supplies a new_handler() function, but advises the
KK> overloading of new also.
    Description
set_new_handler installs the function to be called when the global operator 
new() or operator new
[]() cannot allocate the requested memory. By default the new operators throw 
an xalloc exception if memory cannot be allocated. You can change this 
efault
behavior by calling set_new_handler to set a new handler. To retain the 
traditional version of new, which does not throw exceptions, you can use 
set_new_handler(0).
    This if from BC4.52 help files. "The traditional version of new,
    which does not throw execptions..."
    This is ANSI C++ but not ANSI C compatible.
--- GEcho 1.00
---------------
* Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.