1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Faster browser destruction

Faster browser destruction. All timers have been removed from the demos.
Removed unnecessary client handler class in TChromium. Now there's only
an interface.
Fixed an old memory leak in popup windows.
This commit is contained in:
Salvador Diaz Fau
2017-06-11 17:48:20 +02:00
parent d0c7e0926e
commit 830117e0ca
47 changed files with 1118 additions and 864 deletions

View File

@@ -71,6 +71,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@@ -127,9 +128,19 @@ begin
FEvent := events;
end;
destructor TCustomDialogHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
function TCustomDialogHandler.OnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback): Boolean;
begin
Result := FEvent.doOnFileDialog(browser, mode, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback);
if (FEvent <> nil) then
Result := FEvent.doOnFileDialog(browser, mode, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback)
else
Result := inherited;
end;
end.