【发布时间】:2010-10-20 19:35:21
【问题描述】:
我应该在从 TObject 或 TPersistent 派生的类的构造函数中调用“inherited”吗?
constructor TMyObject.Create;
begin
inherited Create; // Delphi doc: Do not create instances of TPersistent. Use TPersistent as a base class when declaring objects that are not components, but that need to be saved to a stream or have their properties assigned to other objects.
VectorNames := TStringList.Create;
Clear;
end;
【问题讨论】:
标签: delphi