[DUG] Related try..finally question

Alister Christie alister at salespartner.co.nz
Fri Jul 21 16:39:17 NZST 2006


Exceptions can be generated in constructors as well.
so
try
  x := Tobj.Create;  //an exception could occur here
finally
  x.free;//this is now a programming error
end;


Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
http://www.salespartner.co.nz
PO Box 13085
Johnsonville
Wellington 



Todd Martin wrote:
> Agreed. The idea that an object raises an exception in its destructor 
> is mind boggling.
>


More information about the Delphi mailing list