Am Di., 12. Feb. 2019, 16:56 hat Marc Santhoff <m.santh...@web.de>
geschrieben:

> On Mon, 2019-02-11 at 10:21 +0000, Michael Schnell wrote:
> > > Yes, but how do I get notified, when the thread is gone, and I can free
> > > the
> > > memory (of the object that was created)?
> >
> > Ah, now I finally see the problem :)
> >
> > The only idea that comes in my mind is creating yet another thread or a
> > TTimer (by means of "QueueAsyncCall") to poll if the original Threads
> still
> > living. This supposedly would involve OS calls for getting the thread ID
> and
> > for checking same for validity. Ugly ! :( .
>
> If the LazLogger user has to put debugln() statements in his code, me
> thinks
> it would be an acceptable price to tell him:
>
> "If you are using debugln() inside threads, let each thread register with
> the
> logger before first usage."
>

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.

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to