ChromiumBeforeDownload中如果调用其他窗体文件做show操作,程序关闭时会内存释放错误,改用消息处理:
PostMessage(MianHandle,Framme_ShowMyTAB_LJK,0,Cardinal(pMes));
while sshow='' do
begin
Application.ProcessMessages;
Sleep(50);
end;
TempFullPath:=sshow;
procedure TBrowserFrame.Chromium1DownloadUpdated(Sender: TObject;
const browser: ICefBrowser; const downloadItem: ICefDownloadItem;
const callback: ICefDownloadItemCallback);
var myshowinfo:pshowinfo;
begin
//这里new会自动释放?
New(myshowinfo);
end;