在FullDebugMode中使用带有FastMM4(版本4.992)的Delphi XE8会产生奇怪的效果.
要重现效果,只需要创建一个新的TForm的应用程序,把FastMM4在DPR文件的第一行,放一个按钮在窗体上,并把下面的代码在clickHandler:
(您需要安装FastMM 4,必须在FastMM4Options.inc文件中启用FullDebugMode,并且FullDebugMode.dll必须位于程序的输出文件夹中!)
procedure TForm3.Button4Click(Sender: TObject);
var
dm: tdatamodule;
doc: txmldocument;
begin
//this causes the messagebox to be shown directly after clicking the button.
//without it the box is shown when the program is exited.
FastMM4.FullDebugModeScanMemoryPoolBeforeEveryOperation := true;
//prepare a xml document
dm := tdatamodule.create(nil);
doc := txmldocument.create(dm);
doc.LoadFromXml('<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?><root/>');
//doc.Active := true; //no need to set active to true. doc is already active at this point!
//the following does matter. ChildNodes needs to be accessed …Run Code Online (Sandbox Code Playgroud)