Closed fredvs closed 5 years ago
OK Fred, thank you. So there would be a problem with RegExpr unit?
I make some tests and come back to you.
Regards.
You were right, Fred. No more memory leak, after I commented out the calls to CommandLine unit. Good! I think I will remake the unit, using another regex library. I come back to you, as soon as it is done.
Yes, good idea, you even do not need any other regex library, ParamStr(x)
is your friend.
For example:
x := 1;
While ParamStr(x) <> '' do
begin
if ParamStr(x) = 'this' then dothat;
inc(x);
end;
Thank you Fred for the example.
I remade the CommandLine unit without using RegExpr, and the problem is still here. So I don't know what to think. I continue to investigate.
Good night!
Maybe eschecs (like me) is not too fan of command-line parameter for a GUI app? ... Ooops, ok, ok, I go to sleep.
Good night Roland!
I expected that you would say something like that. :)
I will think of another solution. Good night Fred!
Hello Fred!
Done. Eschecs no longer uses the beautiful CommandLine unit. Instead of sending command parameters, the Options application overwrites eschecs.ini before starting Eschecs.
By the way, I believe I had forgotten a file in my commit of yesterday. It is repaired, and it should be possible now to start Eschecs from any directory. (I have to do the same modification in the Options application.)
I promised to do something for the eaten pieces but, as it it a new feature, maybe we could do it in a future version, 5.1.0 for example?
So, we have solved the memory leak. :)
Best regards.
Roland
Hello Roland. Sorry for the wonderful CommandLine units. Rip. About eaten pieces, yes there is no worry. Congratulation for killing the memory leak.
Fre;D
Hello Roland.
The memory leak comes from
CommandLine
Without using CommandLine, no memory leak. Very strange because all is freed in
finalization LExpr.Free;
For testing I replaced code with followed and no more memory leak.