mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 20:39:43 +02:00
+ Fixed memory leak in TIPCCserver
git-svn-id: trunk@4212 -
This commit is contained in:
parent
e772485a40
commit
9ecfcf0e09
@ -242,6 +242,7 @@ end;
|
||||
destructor TSimpleIPCServer.destroy;
|
||||
begin
|
||||
Active:=False;
|
||||
FreeAndNil(FMsgData);
|
||||
inherited destroy;
|
||||
end;
|
||||
|
||||
@ -268,17 +269,23 @@ end;
|
||||
|
||||
procedure TSimpleIPCServer.StartServer;
|
||||
begin
|
||||
If (FServerID='') then
|
||||
FServerID:=ApplicationName;
|
||||
FIPCComm:=CommClass.Create(Self);
|
||||
FIPCComm.StartServer;
|
||||
if Not Assigned(FIPCComm) then
|
||||
begin
|
||||
If (FServerID='') then
|
||||
FServerID:=ApplicationName;
|
||||
FIPCComm:=CommClass.Create(Self);
|
||||
FIPCComm.StartServer;
|
||||
end;
|
||||
FActive:=True;
|
||||
end;
|
||||
|
||||
procedure TSimpleIPCServer.StopServer;
|
||||
begin
|
||||
FIPCComm.StopServer;
|
||||
FreeAndNil(FIPCComm);
|
||||
If Assigned(FIPCComm) then
|
||||
begin
|
||||
FIPCComm.StopServer;
|
||||
FreeAndNil(FIPCComm);
|
||||
end;
|
||||
FActive:=False;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user