I've enabled memory leaks reporting:
ReportMemoryLeaksOnShutdown := True;
When I close my program I have a memory leak report like this :
But how to find exactly which objects was not released ?
I've enabled memory leaks reporting:
ReportMemoryLeaksOnShutdown := True;
When I close my program I have a memory leak report like this :
But how to find exactly which objects was not released ?
You may use LeakCheck (or FastMM Full Debug Mode). LeakCheck outputs stack trace of the allocation (if enabled). It may even output dependency graph of the leak so you get the root cause.
LeakCheck way:
LeakCheck, LeakCheck.Setup.Trace
to DPR uses
sectionLeakCheck.Report.FileLog
to uses
as well (use with care as it scans the memory) - it generates .dot
file that you can pipe through Graphviz to generate the leak graph