RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TThread.OnTerminate Event

Occurs after the thread's Execute method has returned and before the thread is destroyed.

Pascal
property OnTerminate: TNotifyEvent;
C++
__property TNotifyEvent OnTerminate;

Write an OnTerminate event handler to execute code after the thread finishes executing. The OnTerminate event handler is called in the context of the main thread, which means methods and properties can be called freely. 

 

DoTerminate 

Terminated 

FatalException 

Waiting for a Task to Be Completed 

Writing Clean-up Code

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!