Re: [fpc-devel] finalization

2019-01-22 Thread Sven Barth via fpc-devel
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

Re: [fpc-devel] finalization

2019-01-22 Thread J. Gareth Moreton
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

[fpc-devel] finalization

2019-01-22 Thread Alexander via fpc-devel
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