[lazarus] TObject.Free problem ??

Michael Van Canneyt michael.vancanneyt at wisa.be
Wed Sep 20 03:07:28 EDT 2000




On 19 Sep 2000 pouppah at www.com wrote:

> 
> A quick question about free pascal's TObject.
> Is there a problem with TObject.Free not checking
> for a nil Self or am I on the wrong train here.

It does:

        procedure TObject.Free;

        begin
           // the call via self avoids a warning
           if self<>nil then
             self.destroy;
        end;

> How does lazarus deal with an exception which
> occurs during the execution of a constructor?

You must explicitly catch them. 

Michael.






More information about the Lazarus mailing list