unit Unit1;
interface
type
TMyClass = class(TObject)
private
public
constructor Create;
destructor Destroy;
end;
implementation
constructor TMyClass.Create;
begin
inherited Create; // ??
end;
destructor TMyClass.Destroy;
begin
end;
end.
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils,
Unit1 in 'Unit1.pas';
var
MyClass : TMyClass;
begin
MyClass.Create;
MyClass.Destroy;
end.
Цитата
[Warning] Project1.dpr(14): Variable 'MyClass' might not have been initialized