unit ObjList;
{ TList descendant, that calls Free for each Item from Clear or Destroy
  methods (no other method frees the items!!!) }
interface
uses Classes;

type
  TObjList = class(TList)
    destructor Destroy;override;
    procedure Clear; override;
  end;

implementation

procedure TObjList.Clear;
var
  i: integer;
begin
  for i := 0 to Count - 1 do
    TObject(Items[i]).Free;
  inherited;
end;

destructor TObjList.Destroy;
begin
  Clear;
  inherited;
end;

end.
