You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-12 22:07:39 +02:00
Partial fix for issue #291
- Create the CefApp handlers only when they are needed in SingleProcess mode. - Added several "RemoveReferences" procedures to disable events when the application is shutting down in the CefApp handlers.
This commit is contained in:
@ -90,6 +90,8 @@ type
|
||||
procedure OnLoadEnd(const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer); override;
|
||||
procedure OnLoadError(const browser: ICefBrowser; const frame: ICefFrame; errorCode: TCefErrorCode; const errorText, failedUrl: ustring); override;
|
||||
|
||||
procedure RemoveReferences; override;
|
||||
|
||||
public
|
||||
constructor Create(const aCefApp : TCefApplicationCore); reintroduce; virtual;
|
||||
destructor Destroy; override;
|
||||
@ -273,11 +275,16 @@ end;
|
||||
|
||||
destructor TCustomRenderLoadHandler.Destroy;
|
||||
begin
|
||||
FCefApp := nil;
|
||||
RemoveReferences;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TCustomRenderLoadHandler.RemoveReferences;
|
||||
begin
|
||||
FCefApp := nil;
|
||||
end;
|
||||
|
||||
procedure TCustomRenderLoadHandler.OnLoadEnd(const browser : ICefBrowser;
|
||||
const frame : ICefFrame;
|
||||
httpStatusCode : Integer);
|
||||
|
Reference in New Issue
Block a user