How to detect memory leaks in Free Pascal/Lazarus?

Free Pascal has a similar feature. At the end of the program, call DumpHeap or enable the heaptrc option in the Lazarus project settings. The output file can be set with the SetHeapTraceOutput method.

Both methods are in the unit heaptrc which must be the first in the project (to capture allocations from start).

While mjn is completely right, and what he says is the prefered solution, on *nix one can also use unit "cmem" (first unit in main program) to switch the memory manager to libc's malloc, and use other debug tools.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions