Bueno... me he creado un ejemplo simplificando:
Código Delphi
[-]
unit Unit2;
interface
uses Classes, StdCtrls, SysUtils, Dialogs;
type
TMiCombo = class(TComboBox)
FItems:TStringList;
published
property Items:TStringList read FItems;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
implementation
constructor TMiCombo.Create(AOwner: TComponent);
begin
inherited;
FItems := TStringList.Create;
end;
destructor TMiCombo.Destroy;
var
i:integer;
begin
if FItems<>nil then
for i:= 0 to Self.Items.Count-1 do
begin
Items.Objects[i].Free;
Items.Objects[i] := nil;
end;
inherited Destroy;
end;
end.
Y cuando creo el objeto:
Código Delphi
[-]
MiCombo := TMiCombo.Create(Self);
MiCombo.Parent := Self;
Si quito lo que está marcado en rojo... me da el mismo error que en tu código...
Espero que te sirva de pista
Ya nos contarás...