H
HsyPrg
Unregistered / Unconfirmed
GUEST, unregistred user!
function GetAObject:TStrings;
begin
result:=TStringList.Create;
result.Add('test');
end;
procedure Form1.Create;
begin
cbcbDep.Items.AddStrings(GetAObject);
//cbcbDep 为TCombobox控件
end;
Create事件完后,GetAObject返回的TStrings类实例会被自动释放吗?
这种用法很普遍,我却很疑惑
begin
result:=TStringList.Create;
result.Add('test');
end;
procedure Form1.Create;
begin
cbcbDep.Items.AddStrings(GetAObject);
//cbcbDep 为TCombobox控件
end;
Create事件完后,GetAObject返回的TStrings类实例会被自动释放吗?
这种用法很普遍,我却很疑惑