mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 00:49:09 +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);
|
Procedure ThreadTerminated(Sender : TObject);
|
||||||
public
|
public
|
||||||
Constructor CreateList(aPool : TFPCustomSimpleThreadPool); override;
|
Constructor CreateList(aPool : TFPCustomSimpleThreadPool); override;
|
||||||
|
Destructor Destroy; override;
|
||||||
Procedure TerminateThreads; override;
|
Procedure TerminateThreads; override;
|
||||||
Function GetAvailableThread : TAbstractTaskThread; override;
|
Function GetAvailableThread : TAbstractTaskThread; override;
|
||||||
Function AddThread : TAbstractTaskThread; override;
|
Function AddThread : TAbstractTaskThread; override;
|
||||||
@ -446,6 +447,12 @@ begin
|
|||||||
FList:=TThreadList.Create;
|
FList:=TThreadList.Create;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
destructor TFPCustomSimpleThreadPool.TThreadPoolList.Destroy;
|
||||||
|
begin
|
||||||
|
FreeAndNil(FList);
|
||||||
|
Inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
function TFPCustomSimpleThreadPool.TThreadPoolList.GetAvailableThread: TAbstractTaskThread;
|
function TFPCustomSimpleThreadPool.TThreadPoolList.GetAvailableThread: TAbstractTaskThread;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
|
Loading…
Reference in New Issue
Block a user