* fix memory leak in TFPCustomSimpleThreadPool.TThreadPoolList

This commit is contained in:
Ondrej Pokorny 2021-09-08 16:43:04 +02:00 committed by Michael Van Canneyt
parent ef0aea8ca2
commit f4cc2447a2

View File

@ -189,6 +189,7 @@ Type
Procedure ThreadTerminated(Sender : TObject);
public
Constructor CreateList(aPool : TFPCustomSimpleThreadPool); override;
Destructor Destroy; override;
Procedure TerminateThreads; override;
Function GetAvailableThread : TAbstractTaskThread; override;
Function AddThread : TAbstractTaskThread; override;
@ -446,6 +447,12 @@ begin
FList:=TThreadList.Create;
end;
destructor TFPCustomSimpleThreadPool.TThreadPoolList.Destroy;
begin
FreeAndNil(FList);
Inherited;
end;
function TFPCustomSimpleThreadPool.TThreadPoolList.GetAvailableThread: TAbstractTaskThread;
Var