mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 13:29:27 +02:00
* fix memory leak in TFPCustomSimpleThreadPool.TThreadPoolList
This commit is contained in:
parent
ef0aea8ca2
commit
f4cc2447a2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user