使用delphi XE,在project的 Application.Initialize;
前加入了如下语句:
ReportMemoryLeaksOnShutdown := DebugHook<>0;但是编译时有Warning提示:
symbol 'debughook' is specific to a platform
然后F9运行后,没有任何内存泄露的提示。即使我自己注释掉了某些form的frm.Free;函数,依然没有泄露提示。
哪位大侠给点建议,delphi XE下好用的内存泄露检测工具和检测方法是什么?多谢。
前加入了如下语句:
ReportMemoryLeaksOnShutdown := DebugHook<>0;但是编译时有Warning提示:
symbol 'debughook' is specific to a platform
然后F9运行后,没有任何内存泄露的提示。即使我自己注释掉了某些form的frm.Free;函数,依然没有泄露提示。
哪位大侠给点建议,delphi XE下好用的内存泄露检测工具和检测方法是什么?多谢。
ReportMemoryLeaksOnShutdown := true;
{$ENDIF}
也许你的窗体是有owner的,所以不用free你可以在主窗体create中建个对象测试下,比如
var
test: tstringlist;
begin
test := stringlist.create;
//不释放 test
end;
不过这个提示也太简单了,有没有像Purify或者valgrind那种可以定位到代码行的内存泄露提示啊?
你可以装个EurekaLog试试,有内存泄漏检查功能,可以定位到代码行