I am debugging my program using FastMM, and it seems that many of the memory leaks that it reports seem to be a legitimate memory allocation, not a memory leak.
For instance,
A memory block has been leaked. The size is: 20
This block was allocated by thread 0xD44, and the stack trace (return addresses) at the time was:
404902 [System.pas][System][@GetMem][3693]
406597 [System.pas][System][TObject.NewInstance][11044]
406B2A [System.pas][System][@ClassCreate][12121]
60A1D2 [CtrlObjs.pas][Ctrlobjs][TConnObj.Create][430]
61703B [Control.pas][Control][TControlMgr.FindLinks][854]
60ACB2 [CtrlObjs.pas][Ctrlobjs][TControlObject.FindLink][746]
60E2A3 [CtrlObjs.pas][Ctrlobjs][TDelayControl.EvalPulse][2105]
60E4C0 [CtrlObjs.pas][Ctrlobjs][TDelayControl.Evaluate][2193]
6102D4 [CtrlObjs.pas][Ctrlobjs][TLineControl.Evaluate][3155]
60ABF1 [CtrlObjs.pas][Ctrlobjs][TControlObject.ActiveCount][711]
6105D8 [CtrlObjs.pas][Ctrlobjs][TLineControl.ActiveCount][3261]
The block is currently used for an object of class: TConnObj
TConnObj is a class that is often used to create an object and is destroyed when the program is no longer needed. However, FastMM reports this as an actual memory leak. So, how do you know what it is when viewing a FastMM memory leak log file?
source
share