ADD: Count() in TThreadObjectList

This commit is contained in:
rich2014 2026-06-15 13:08:57 +08:00
commit 9b49371938

View file

@ -73,6 +73,7 @@ type
procedure Clear;
function Clone: TObjectList;
function Add(AObject: TObjectEx): Integer;
function Count: Integer;
function LockList: TObjectList;
procedure UnlockList;
end;
@ -141,6 +142,12 @@ begin
Result:= FList.Add(AObject);
end;
function TThreadObjectList.Count: Integer;
begin
// no need to lock
Result:= FList.Count;
end;
function TThreadObjectList.LockList: TObjectList;
begin
Result:= FList;