Memory leaks lazarus / 12-Debugger ---------------------------------------------------------------------- CanineQwer · 2020-03-16 20:37 I am using Lazarus 2.0.6 under Linux. Give at least 1 reliable way to find memory leaks. heaptrc crashes the program. I heard about cmemtest, but I just can't find it. * I'm testing on the simplest form with a button with a function begin   TButton.Create (nil); end; ---------------------------------------------------------------------- Martin_fr · 2020-03-16 20:51 Use   valgrind --tool=memcheck You need to compile with "uses cmem". cmem must be the very first, in the uses clause of your main program. Note, that this is going to run real slow. You can load the output into: view > leaks and traces ---------------------------------------------------------------------- CanineQwer · 2020-03-16 22:03 Thank you, you helped me a lot.