Changeset 145 for trunk/Packages/Common/DebugLog.pas
- Timestamp:
- Jun 5, 2023, 6:44:57 PM (18 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/DebugLog.pas
r144 r145 1 unit UDebugLog;1 unit DebugLog; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, FileUtil, fgl, SyncObjs;6 Classes, SysUtils, FileUtil, Generics.Collections, SyncObjs; 7 7 8 8 type … … 13 13 Group: string; 14 14 Text: string; 15 end; 16 17 TDebugLogItems = class(TObjectList<TDebugLogItem>) 15 18 end; 16 19 … … 27 30 procedure SetMaxCount(const AValue: Integer); 28 31 public 29 Items: T FPGObjectList<TDebugLogItem>;32 Items: TDebugLogItems; 30 33 Lock: TCriticalSection; 31 34 procedure Add(Text: string; Group: string = ''); … … 42 45 43 46 procedure Register; 47 44 48 45 49 implementation … … 115 119 begin 116 120 inherited; 117 Items := T FPGObjectList<TDebugLogItem>.Create;121 Items := TDebugLogItems.Create; 118 122 Lock := TCriticalSection.Create; 119 123 MaxCount := 100; … … 124 128 destructor TDebugLog.Destroy; 125 129 begin 126 Items.Free;127 Lock.Free;130 FreeAndNil(Items); 131 FreeAndNil(Lock); 128 132 inherited; 129 133 end; 130 134 131 135 end. 132
Note:
See TracChangeset
for help on using the changeset viewer.