2011-12-22 73 views
13

我想不出如何使用FastMM。我已經從SourceForge下載它並將FastMM4Messages.pas和FastMM4.pas放在我的dpr文件的頂部。如何在FastMM4中啓用完整調試模式?

我現在調用這個過程泄漏一些內存:

procedure testMemoryFastMM; 
    var 
    str : TStringList; 
     begin 
    str:=TStringList.Create; 
    str.add('MemChk'); 
    str.SaveToFile('C:\leeMemChk.txt'); 
    end; 

,並得到這個消息 enter image description here

如何使這些FullDebugMode和LogMemoryLeakDetailsToFile交換機?

回答

17

FastMM4附帶包含文件(FastMM4Options.inc)。該文件包含FastMM4的所有選項,其中一些選項已被註釋掉。取消註釋以激活它們,然後將{$INCLUDE FastMM4Options.inc}放入您的dpr文件中,將inc文件包含在您的項目中。

+0

yes..the FastMM4Options.inc文件存在...我取消註釋了.. {$ define LogErrorsToFile}和{$ define LogMemoryLeakDetailToFile},但仍然有評論說「{設置此選項以將所有錯誤記錄到文本文件與 應用程序在同一個文件夾中,內存錯誤(設置了FullDebugMode選項)將被追加到日誌文件中,如果沒有設置「FullDebugMode」,則不會產生影響}「.... so how to set」 FullDebugMode「 – PresleyDias 2011-12-22 09:19:16

+7

'FullDebugMode'是同一個.inc文件中可用的定義之一。 – 2011-12-22 09:21:51

+0

@ RemyLebeau-TeamB謝謝你發現它... – PresleyDias 2011-12-22 09:39:29

相關問題