Delphi プロジェクトで独自のクラスを構築しようとしています。コードは次のようになります。
type
TMyClass = class(TObject)
private
hwnMain, hwnChild: HWND;
Buffer, URL: string;
Timer: TTimer;
public
procedure ScanForClass;
end;
var
Form1: TForm1;
TimerAccess: TMyClass;
implementation
procedure TForm1.FormCreate(Sender: TObject);
begin
TimerAccess.ScanForClass;
end;
procedure TMyClass.ScanForClass;
begin
Timer:= TTimer.Create(Application); **here I get Access Violation!!**
Timer.Interval:= 5000;
Timer.Enabled:= true;
なぜそのアクセス違反が発生するのですか?