Internet Direct (Indy) Version 9.0.2 Beta
TIdThreadMgr.ReleaseThread
Terminate and free a thread instance.

procedure ReleaseThread(AThread: TIdThread); virtual; abstract;
Parameters
AThread: TIdThread
Thread to be released.

Description
ReleaseThread is a virtual abstract procedure that instructs the TIdThreadMgr to terminate and free a thread instance.

ReleaseThread is not implemented in TIdThreadMgr. Descendants of TIdThreadMgr must implement ReleaseThread to satisfy the requirements for the specific thread manager. ReleaseThread can force the thread to Terminate, WaitFor the thread to complete execution, and Free the thread instance. ReleaseThread may also implement other functionality as required in the TIdThreadMgr descendant.

ReleaseThread should use the critical section Lock, or other mechanism, to protect the ActiveThreads list while removing the thread instance.

ReleaseThread is used in TerminateThreads.