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

Santiago A. svaa at ciberpiula.net
Thu Oct 13 19:35:41 CEST 2016


El 13/10/2016 a las 15:07, Graeme Geldenhuys escribió:
> On 2016-10-13 13:48, Sven Barth wrote:
>> That won't help with Halt() however as that will "jump" directly to the
>> unit finalization, ignoring any and all exception handlers along the way.
>
> Wow, that's a bit harsh. Overriding the whole meaning of the
> try..finally language feature. Then I would recommend NOT using Halt()
> for anything - its nasty.

I only use it in the interpreting command line parameters phase. If
there is an error, I display help and halt. And probably even in this
cases I shouldn't, it's a dirty hack.

-- 
Saludos
Santiago A.




More information about the fpc-pascal mailing list