On 2020-02-23 15:26, fredvs via fpc-pascal wrote:
Hi,
OK, I opted for changing in procedure Tjtop.Usage(ECode: word); halt(Ecode); //------> This produces a memory leak with terminate; // ------> No nore memory leak.
This makes no sense from my point of view. Halt finishes execution of the program. At that point, all memory previously allocated to that program should be returned to the operating system (at least standard operating systems do so), thus the leak may make no difference. The difference between your version and the original one is that the original finishes the program with some error code thus allowing some error checking in case the program was called from some script, etc., whereas your version finishes with a result of 0 even if the processing encountered some errors.
Tomas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal