<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr">Am Fr., 14. Dez. 2018, 10:31 hat Michael Van Canneyt <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>> geschrieben:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On Fri, 14 Dec 2018, el es wrote:<br>
<br>
> On 13/12/2018 22:23, Michael Van Canneyt wrote:<br>
>> <br>
>> <br>
>> On Thu, 13 Dec 2018, Martin Frb wrote:<br>
>> <br>
>>> <br>
>>> ---- Besides, the documentation does not say that FreeOnTerminate<br>
>>> is limited to be used in the thread construction. Especially since<br>
>>> its effect is not due until "terminate"<br>
>> <br>
>> For me this is a given.<br>
>> <br>
>> Almost by definition, changing anything in a thread after the<br>
>> constructor has returned, is dangerous. You should set up everything<br>
>> in the constructor.<br>
><br>
><br>
> Then this TThread.FreeOnTerminate property should not really be public,<br>
> if it's only to be used in 'private' context of the constructor?<br>
<br>
I think FreeOnTerminate should not even exist. IMO it should simply be 'True'.<br></blockquote></div><div dir="auto"><br></div><div dir="auto">I disagree, because then you could never do a WaitFor(). Or provide the thread with new data through a method (that fills a queue that the thread processes) without risking an access violation. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>