<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">Am Di., 12. Feb. 2019, 16:56 hat Marc Santhoff <<a href="mailto:M.Santhoff@web.de">M.Santhoff@web.de</a>> geschrieben:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 2019-02-11 at 10:21 +0000, Michael Schnell wrote:<br>
> > Yes, but how do I get notified, when the thread is gone, and I can free<br>
> > the<br>
> > memory (of the object that was created)?<br>
><br>
> Ah, now I finally see the problem :)<br>
><br>
> The only idea that comes in my mind is creating yet another thread or a<br>
> TTimer (by means of "QueueAsyncCall") to poll if the original Threads still<br>
> living. This supposedly would involve OS calls for getting the thread ID and<br>
> for checking same for validity. Ugly ! :( .<br>
<br>
If the LazLogger user has to put debugln() statements in his code, me thinks<br>
it would be an acceptable price to tell him:<br>
<br>
"If you are using debugln() inside threads, let each thread register with the<br>
logger before first usage."<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Not every LazLogger user knows that their code is run in a thread. And not every thread user knows that the code they are using is using LazLogger in turn. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"></div></div></div>