我正在使用 FastMM 调试我的程序,它报告的许多内存泄漏似乎是合法的内存分配,而不是实际的内存泄漏。
例如,
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 是经常用于创建对象并在程序不再需要时销毁的类。但是,FastMM 报告它是实际的内存泄漏。那么,在查看 FastMM 内存泄漏日志文件时,如何判断哪个是哪个?