[fpc-devel] finalization

Sven Barth pascaldragon at googlemail.com
Tue Jan 22 11:11:07 CET 2019

Am Di., 22. Jan. 2019, 10:55 hat Alexander via fpc-devel <
fpc-devel at lists.freepascal.org> geschrieben:

> Hi,
> I try use finalization in unit, but it not work.
> When press Ctrl+C and exit program uses this unit
> PC-Speaker stay infinity play on interrupted tone.
> When Ctrl+C use spkoff; in finalization section not called.

You need to explicitly handle the SIGINT signal so that your program can
terminate gracefully. The default behavior is to simply kill the program
which means that the finalization sections won't run.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190122/d758e17c/attachment.html>

More information about the fpc-devel mailing list