TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: PAUL WANKADIA
from: ALEXANDRE OSTANINE
date: 1997-04-09 18:21:00
subject: self-destruct

Paul Wankadia wrote in a message to All:
PW> I'm wondering how to, from an object's constructor, to
PW> self-destruct.  E.g. if there is some kind of error, the
PW> object will NOT be created. 
PW> Could someone please tell me how to do this and how to
PW> detect if the object has been created or not?  I'm accessing
PW> the object thru a pointer (using new and delete to create
PW> and destroy it, respectively).  TIA.
PW> --- PPoint 2.00
In Windows API there is one function that can do all the work for you:
  BOOL IsBadCodePtr(lpfn)
  (for more help see Windows API help file (New 3.1 kernel functions).
Alexandre
---
---------------
PW> * Origin: Junyer's Workshop (3:640/772.3)
* Origin: Just another Selverd point . (2:282/608.74)

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™.