▲▼关于Delphi中Cell释放的问题,为什么总是关掉程序的时候出错
ZyxIp 2003-09-05 02:50:07 主窗体上有一个PageControl1,上面有TabSheet1
在TabSheet1中有一Cell1.
主窗体上中有一按钮Button1,单击事件中这样写
var
Form:TForm ;
pagecontrol:TPageControl ;
begin
Form:=TForm .Create(Self);
Form.Font :=Self.Font ;
pagecontrol:=TPageControl .Create(Form);
pagecontrol .Parent :=Form ;
pagecontrol .Align :=alClient ;
TabSheet1.PageControl :=pagecontrol ;
Form .ShowModal ;
pagecontrol .Free;
Form.Free ;
end;
执行后新建了一模式窗口,form关闭也正常,可在整个程序退出时出错了。请问如何实现解决
debugger exception notification
project project1.exe raised exception class EAccessViolation with message
'access violation at address 6bc41c65 in module 'MFC42.DLL',read of address 0227b6b0,process stopped .use step or run to continue.