Recent

Author Topic: [Problem solved] Wish: stop the race after Delphi  (Read 5877 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 2196
    • StrumPract is the musicians best friend
Re: Wish: stop the race after Delphi
« Reply #60 on: February 28, 2021, 11:22:53 am »
Fred, is that parameter included by default? Because it showed me no warnings. If is not default, then that is true also for Lazarus.

Hello.

Not sure to understand.

Using Lazarus, you need to enable gl + gh in project option: see picture.

For mseide (or ideU) you set it in project options too: see picture.

When you close your application, there should have some info about the memory leak: see picture of the mseide-console:
It should be the same with Lazarus.

Fre;D


I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 2196
    • StrumPract is the musicians best friend
Re: [Problem solved] Wish: stop the race after Delphi
« Reply #61 on: February 28, 2021, 12:37:32 pm »
Re-hello.

Fred, is that parameter included by default? Because it showed me no warnings. If is not default, then that is true also for Lazarus.

No, -ghl is not set as default (imho).
But (imho too) it seems to me that this is a good practice to always use the -ghl parameter for each project.

This to directly see, after each change, if no memory leak was added.
And when your project is ready for release, remove that -ghl parameter to have a clean binary without any debug code added.

Fre;D
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

FTurtle

  • Sr. Member
  • ****
  • Posts: 289
Re: Wish: stop the race after Delphi
« Reply #62 on: February 28, 2021, 06:08:41 pm »
Code: Pascal  [Select][+][-]
  1.       result := (FindFirst('*',faDirectory, _fsearch) = 0);


Thank you @FTurtle, is that binary evaluation true also for Basic (Gambas3) and Python?

If some language has boolean type then such approach is applicable.

 

TinyPortal © 2005-2018