[fpc-pascal] changes in TThread.OnTerminate in fcp-3.0?
pascaldragon at googlemail.com
Thu Dec 10 11:13:27 CET 2015
Am 10.12.2015 11:05 schrieb "Luca Olivetti" <luca at ventoso.org>:
> in a couple of programs I'm using this idiom:
> procedure TMyForm.MyThreadTerminate(Sender:TObject);
> //do something with FMyThread then
> With fpc 2.6.4 it worked flawlessly, with fpc 3.0 sometimes it causes a
sigsev somewhere inside CheckSynchronize.
> I could find nothing here
> related to this.
> I realize that's an implementation detail so probably what I did was
wrong (was it?).
I'd need to check what the RTL does after OnTerminate is called, but it
could be that this worked by chance...
> What are the possible solutions (apart from omitting the call to
FreeAndNil and setting FreeOnTerminate to true)?
That would be the safest solution (you can set FMyThread to Nil however
inside that handler).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal