Changeset 219 for trunk/Packages/Common/Threading.pas
- Timestamp:
- Jan 17, 2025, 9:05:54 PM (4 days ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Threading.pas
r218 r219 1 unit UThreading; 2 3 {$mode delphi} 1 unit Threading; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, Forms, fgl, SyncObjs;6 Classes, SysUtils, Forms, Generics.Collections, SyncObjs; 9 7 10 8 type 11 9 TExceptionEvent = procedure (Sender: TObject; E: Exception) of object; 12 10 TMethodCall = procedure of object; 13 14 11 15 12 { TVirtualThread } … … 102 99 { TThreadList } 103 100 104 TThreadList = class(T FPGObjectList<TVirtualThread>)101 TThreadList = class(TObjectList<TVirtualThread>) 105 102 function FindById(Id: TThreadID): TVirtualThread; 106 103 constructor Create; virtual; … … 191 188 constructor TThreadList.Create; 192 189 begin 193 inherited Create;190 inherited; 194 191 end; 195 192 … … 294 291 ThreadListLock.Release; 295 292 end; 296 F Thread.Free;297 inherited Destroy;293 FreeAndNil(FThread); 294 inherited; 298 295 end; 299 296 … … 361 358 ThreadListLock := TCriticalSection.Create; 362 359 ThreadList := TThreadList.Create; 363 ThreadList. FreeObjects := False;360 ThreadList.OwnsObjects := False; 364 361 365 362 finalization 366 363 367 ThreadList.Free;368 ThreadListLock.Free;364 FreeAndNil(ThreadList); 365 FreeAndNil(ThreadListLock); 369 366 370 367 end. 371
Note:
See TracChangeset
for help on using the changeset viewer.