mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:09:27 +02:00
* move freeing of the event log to a separate, virtual method so that this can be changed depending on the needs of TCustomWebApplication.CreateEventLog (e.g. when using a TCustomWebApplication descendant together with a TDaemonApplication)
This commit is contained in:
parent
86d4820760
commit
7c6f3810e3
@ -139,6 +139,7 @@ Type
|
||||
protected
|
||||
Procedure DoRun; override;
|
||||
Function CreateEventLog : TEventLog; virtual;
|
||||
procedure FreeEventLog(AEventLog: TEventLog); virtual;
|
||||
function InitializeWebHandler: TWebHandler; virtual; abstract;
|
||||
Procedure DoLog(EventType: TEventType; const Msg: String); override;
|
||||
procedure SetTitle(const AValue: string); override;
|
||||
@ -579,6 +580,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomWebApplication.FreeEventLog(AEventLog: TEventLog);
|
||||
begin
|
||||
AEventLog.Free;
|
||||
end;
|
||||
|
||||
function TCustomWebApplication.GetEventLog: TEventLog;
|
||||
|
||||
begin
|
||||
@ -731,8 +737,7 @@ end;
|
||||
destructor TCustomWebApplication.Destroy;
|
||||
begin
|
||||
FWebHandler.Free;
|
||||
if assigned(FEventLog) then
|
||||
FEventLog.Free;
|
||||
FreeEventLog(FEventLog);
|
||||
Inherited;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user