mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-27 11:37:19 +01:00
* Check for session in DoneSession, avoids creation of a factory if none is needed.
git-svn-id: trunk@17595 -
This commit is contained in:
parent
e3050439a8
commit
0fb7ad5a07
@ -630,6 +630,8 @@ end;
|
|||||||
procedure TSessionHTTPModule.DoneSession;
|
procedure TSessionHTTPModule.DoneSession;
|
||||||
begin
|
begin
|
||||||
// Session manager may or may not destroy the session.
|
// Session manager may or may not destroy the session.
|
||||||
|
// Check if we actually have
|
||||||
|
if Assigned(FSession) then
|
||||||
SessionFactory.DoneSession(FSession);
|
SessionFactory.DoneSession(FSession);
|
||||||
// In each case, our reference is no longer valid.
|
// In each case, our reference is no longer valid.
|
||||||
FSession:=Nil;
|
FSession:=Nil;
|
||||||
@ -638,7 +640,6 @@ end;
|
|||||||
destructor TSessionHTTPModule.destroy;
|
destructor TSessionHTTPModule.destroy;
|
||||||
begin
|
begin
|
||||||
// Prevent memory leaks.
|
// Prevent memory leaks.
|
||||||
If Assigned(FSession) then
|
|
||||||
DoneSession;
|
DoneSession;
|
||||||
inherited destroy;
|
inherited destroy;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user