Changeset 96 for trunk/Packages/CoolWeb/Network/UTCPServer.pas
- Timestamp:
- Oct 2, 2012, 9:22:02 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 5 5 backup 6 6 ZdechovNET.lps 7 heaptrclog.trc
-
- Property svn:ignore
-
trunk/Packages/CoolWeb/Network/UTCPServer.pas
r84 r96 21 21 22 22 TTCPClientThread = class(TResetableThread) 23 Id: Integer; 23 24 Parent: TTCPServer; 24 25 Socket: TTCPBlockSocket; … … 55 56 FActive: Boolean; 56 57 AcceptThread: TAcceptThread; 58 NewId: Integer; 57 59 procedure SetActive(const AValue: Boolean); 58 60 public … … 94 96 AcceptThread.Terminate; 95 97 AcceptThread.WaitFor; 96 AcceptThread.Destroy;98 FreeAndNil(AcceptThread); 97 99 ThreadPool.Active := False; 98 100 CloseSocket; … … 115 117 destructor TTCPServer.Destroy; 116 118 begin 117 ThreadPool.Destroy;118 119 Active := False; 119 Socket.Destroy; 120 inherited Destroy; 120 FreeAndNil(ThreadPool); 121 FreeAndNil(Socket); 122 inherited; 121 123 end; 122 124 … … 136 138 NewObject.Socket.Socket := NewSocket; 137 139 NewObject.Start; 140 NewObject.Id := Parent.NewId; 141 Inc(Parent.NewId); 138 142 end; 139 143 end; … … 160 164 destructor TTCPClientThread.Destroy; 161 165 begin 162 Socket.Destroy;166 FreeAndNil(Socket); 163 167 inherited; 164 168 end;
Note:
See TracChangeset
for help on using the changeset viewer.