[fpc-pascal] ptop and comma.
fredvs
fiens at hotmail.com
Sun Feb 23 14:01:59 CET 2020
Hello everybody and especially Michael.
OK, I did find the very well hidden memory leak.
In ptop.pp it comes from Procedure TPToP.DoRun, line 140 ---> Usage(1);
And in the procedure Usage(), the last line produces the memory leak.
Procedure TPToP.Usage(ECode : Word);
begin
Writeln ('ptop : Usage : ');
Writeln ('ptop [-v] [-i indent] [-b bufsize ][-c optsfile][-l linesize]
infile outfile');
Writeln (' converts infile to outfile.');
Writeln (' -c : read options from optsfile');
Writeln (' -i : Set number of indent spaces.');
Writeln (' -l : Set maximum output linesize.');
Writeln (' -b : Use buffers of size bufsize');
Writeln (' -v : be verbose');
writeln ('ptop -g ofile');
writeln (' generate default options file');
Writeln ('ptop -h : This help');
halt(Ecode); //////////// ------> This produces a memory leak
end;
So the big question is: What is the purpose of "halt(Ecode)" and would it be
a crime to remove it?
Thanks.
Fre;D
-----
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
More information about the fpc-pascal
mailing list