On Mon, Feb 24, 2020 at 10:11 AM Sven Barth via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:
> You are wrong. Halt() sets the error code provided as parameter. Terminate by > itself does not. > Terminate leads to the destructor being called while Halt exists the program > in a hard way. But as Tomas wrote, when a program terminates all memory is > returned to the OS so that is not really a problem. If you really dislike the memory leak (since it's not "nice programming"), maybe you can set ExitCode before calling terminate? (Untested idea (TM)) -- Bart _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal