[fpc-pascal] Generic way to pre-maturely exit TCustomApplication without memory leaks

grouchysmurf d7559b8c502dea1b5323af444e81e014 at grabun.pl
Thu Oct 13 18:46:58 CEST 2016


Hi.

> Call Terminate and exit properly ?
> TCustomApplication has an exitcode property which will set the global exit
> code.

This feature either undocumented or I am just too stupid to find it. Mind if I
ask you to point me directly to the documentation?

I believe it would have to be something as follows:

ph.Terminate(ExitCode);
ph.Free;

if  I  am reading you correctly. Currently, if I call Terminate(1), it
compiles with following error:

 Error: Wrong number of parameters specified for call to "Terminate"

Would appreciate any help.

Ɓukasz




More information about the fpc-pascal mailing list