Am Di., 22. Jan. 2019, 10:55 hat Alexander via fpc-devel <
fpc-devel@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
Hi Alexander,
Pressing Ctrl+C or Ctrl+Break is an interrupt that breaks normal program
flow - if unhandled, it causes an abnormal program termination and things
don't get cleaned up properly, which includes calling finalization blocks.
Try doing these steps to get around it:
- Include the "S
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.
Unit:
unit spkunit;
{$MODE OBJFPC}
{$ASMMODE INTEL}
{$CODEPAGE UTF8}
{
Unit