Friday, May 07, 2004

Sealed and Final in Delphi 8's VCL/RTL

Since Borland is so wonderfully kind to provide us with the source code to their libraries for Delphi 8.NET I decided to do a grep for sealed and final. The results were surprising.

For sealed the only occurrence I found was:

  TGCHandleList = class sealed(HashTable) 
  strict private
    procedure FreeHandles;
  strict protected
    procedure Finalize; override;
  public
    procedure Clear; override;
  end;
Which I didn't find any help on. Upon closer inspection I noticed that it was in the Implementation section of Borland.Vcl.StdCtrls.pas, so it is not accessible outside of the unit, so no one will ever be using it. So none of the Borland classes for use by developers are sealed.

A grep for final was a little trickier. I did a word only search. IT returned a few instances of the final keyword, but they were all in comments. Not a single instance of a final method to be found.

Good news for Delphi 8 developers.

No comments: