CloseThread

Close a thread and free up resources used by the thread

Declaration

Source position: threadh.inc line 152

  function CloseThread(threadHandle: TThreadID) : DWord;

Description

CloseThread must be called on any thread started with BeginThread . It must be called after the thread has ended (either by exiting the thread function or after calling EndThread ).

Errors

If no threadmanager is installed, an exception may be raised or runtime error 232 may occur if no exceptions are used.

See also

Name Description
BeginThread Start a new thread.
EndThread End the current thread.