Recent

Author Topic: [SOLVED] How do you capture memory leak data into a file?  (Read 3650 times)

440bx

  • Hero Member
  • *****
  • Posts: 4014
Re: How do you capture memory leak data into a file?
« Reply #15 on: September 25, 2019, 04:43:50 pm »
  Solving the problem is demonstrated by the documentation.
Your argument is really very poor. Here is an example of how poor it is:  on page 153 of the FPC reference guide, there is a "precedence of operators" table which, unsurprisingly, includes the Boolean operators.  In spite of that being clearly documented there, you made some assertions about them in another thread that are clearly incorrect. 

Not only are Boolean operators precedence clearly documented, I believe that anyone with the credential you, at least implicitly claim to have, would already know.

Even someone who has read the manuals cannot be expected to remember every single detail, particularly when such details are dependent on how a compiler is implemented.  This is in stark contrast with Boolean operators precedence which are, very likely, implemented the same way by every compiler.  IOW, something that is really hard to "forget".

The bug is that people ask first and then read.
There is bug that is worse than the above, specifically, people who make incorrect authoritative statements, support such statements with dubious credentials and, seem to be unable to ever acknowledge their mistake.  If you need an example of that, read your own posts in this thread.


(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Awesome Programmer

  • Sr. Member
  • ****
  • Posts: 451
  • Programming is FUN only when it works :)
    • Cool Technology
Re: How do you capture memory leak data into a file?
« Reply #16 on: September 27, 2019, 05:22:43 pm »
 :o

Oh my gosh... Did I start a war amongst lazarus users? lol...

Thaddy does have a point. No offense Simone, but that example is little confusing.

So, what are the steps to setting up Leak detection in my GUI application in Lazarus?

Thank you all,

simone

  • Hero Member
  • *****
  • Posts: 573
Re: How do you capture memory leak data into a file?
« Reply #17 on: September 27, 2019, 08:47:17 pm »
I showed the simplest possible example (though not elegant). I enclose an example of a GUI application that generates a memory leak, shown in the heap.trc file. I hope this can help you.

« Last Edit: September 27, 2019, 10:20:44 pm by simone »
Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: How do you capture memory leak data into a file?
« Reply #18 on: October 03, 2019, 11:25:31 pm »
So, what are the steps to setting up Leak detection in my GUI application in Lazarus?
You can find relevant info here:
https://wiki.freepascal.org/heaptrc
https://wiki.freepascal.org/leakview
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Awesome Programmer

  • Sr. Member
  • ****
  • Posts: 451
  • Programming is FUN only when it works :)
    • Cool Technology
Re: How do you capture memory leak data into a file?
« Reply #19 on: October 10, 2019, 05:04:33 pm »
Thank you all for all the inputs and suggestions especially Simone for his awesome example.  :)

simone

  • Hero Member
  • *****
  • Posts: 573
Re: How do you capture memory leak data into a file?
« Reply #20 on: October 10, 2019, 05:46:29 pm »
I'm glad I was a little helpful. :)
Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

Awesome Programmer

  • Sr. Member
  • ****
  • Posts: 451
  • Programming is FUN only when it works :)
    • Cool Technology
Re: How do you capture memory leak data into a file?
« Reply #21 on: October 16, 2019, 03:05:05 pm »
I'm glad I was a little helpful. :)
Actually, simone your example helped me a lot. I think I just jumped the gun too soon earlier.  :)

 

TinyPortal © 2005-2018