Hello guys I have a problem in the closing form created at run time. On linux this error does not occur, but on a window yes.
External exception C0000008
Debugging I realized that the problem is in the:
procedure TCustomForm.Close;
in the case
case CloseAction of
caHide: Hide;
caMinimize: WindowState := wsMinimized;
caFree:
begin
// if form is MainForm, then terminate the application
// the owner of the MainForm is the application,
// so the Application will take care of free-ing the form
// and Release is not necessary
if IsMainForm then
Application.Terminate
else
Release;
end;
end;
And enters the branch caHide , but the correct way is caFree. Why this? Thank you