Whats the recommended way of executing Free (or Destroy) inside the
constructor ?

I have been using Free inside teh constructor which has worked under
Delphi3.  Under Delphi 5, it karks it.  Looking at the code, the idea now
seems naive.

BUT, I still want to do it.  The object is like a process,  all the work is
done in the constructor, after which its simples fot it to commit hara-kiri,
preferably a clean one.

Executing an abort inside the constructor calls the destructor,
unfortunately that leaves an unhandled exception.  Having about 20 of these
beasts, I want the code to look simple and be foolproof.



---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to