Tobias Giesen wrote:
Yes it will terminate and free (if FreeOnTerminate is true).
Remember that if it frees itself due to falling out of the Execute() procedure, a variable containing the TThread descendant won't be set nil.
On the other hand, if it doesn't free itself and relies on the main thread checking an "executing" flag, there's a race condition between this being reset and its being safe for the main thread to call FreeAndNil().
-- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal