Recent

Author Topic: Memory Leak?(Solved)  (Read 265 times)

JLWest

  • Hero Member
  • *****
  • Posts: 1213
Memory Leak?(Solved)
« on: September 19, 2022, 12:39:49 am »
PNG file attached. But what does it mean?
« Last Edit: September 19, 2022, 12:56:42 am by JLWest »
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

rvk

  • Hero Member
  • *****
  • Posts: 5017
Re: Memory Leak?
« Reply #1 on: September 19, 2022, 12:44:47 am »
You have a memory leak somewhere in your program.

(Well... you asked  ;))

JLWest

  • Hero Member
  • *****
  • Posts: 1213
Re: Memory Leak?
« Reply #2 on: September 19, 2022, 12:55:18 am »
Yea, I know, LOL 

I found one I think where I created a TStringList but didn't TList.Free after the finally statement.

@rvk  Never could have done it with out you.
« Last Edit: September 19, 2022, 12:57:47 am by JLWest »
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8462
  • Debugger - SynEdit - and more
    • wiki
Re: Memory Leak?(Solved)
« Reply #3 on: September 19, 2022, 01:36:58 am »
To late for this time, but maybe for the next

Menu: View > Leaks and traces

You can paste the output of the heaptrc there, and then navigate to the sources.

Not sure if that dialog has a copy to clipboard. I compile my apps with console, and then get the output in the console window. (Though, need to get it before the win closes).
There is an environment var to control heaptrc, and I think it caw write to a file too.

JLWest

  • Hero Member
  • *****
  • Posts: 1213
Re: Memory Leak?(Solved)
« Reply #4 on: September 19, 2022, 03:06:26 am »
@Martin_fr

I'll note for next time. (your are assuming there will be a next time!), so am I.
That would be easier that the way I solved the problem.

Thanks.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

 

TinyPortal © 2005-2018