No, a constuctor will not return Nil. If an exception is raised in a constructor, the implicit finalisation code is called (which then calls the Destructor), and the exception bubbles up to the next exception handler.

----- Original Message ----- From: "Jeremy North" <[EMAIL PROTECTED]>
To: "NZ Borland Developers Group - Delphi List" <delphi@delphi.org.nz>
Sent: Thursday, July 26, 2007 7:09 PM
Subject: Re: [DUG] basic question


Which means any constructor could return NIL. Which you didn't make
clear in your explanation. I just wanted to clear that up for others
incase they weren't aware of this.

On 7/26/07, Dennis Chuah <[EMAIL PROTECTED]> wrote:

A constructor ALWAYS creates an instance, even if it encounters an
exception.  The implicit exception handling code then finalises the
instance.
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe


_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

Reply via email to