简体   繁体   English

IXMLDocument AddChild中的内存泄漏(节点)

[英]memoryleak (node) in IXMLDocument AddChild

Apparently there is a memory leak in this code: 显然此代码中存在内存泄漏:

procedure TForm1.Button1Click(Sender: TObject);
var
  doc: IXMLDocument;
begin
  doc := TXMLDocument.Create(Nil);
  doc.Active := True;
  doc.AddChild('test');
  doc := Nil;
end; 

Clicking on the button gives me a report of a memory leak. 单击该按钮会向我报告内存泄漏。 Is this a false positive or is there a leak? 这是假阳性还是有泄漏? IDE is Rad Studio 10.2 IDE是Rad Studio 10.2

I contacted Eurekalog support: it was a false positive of a RESOURCE leak (not a memory leak as my title says). 我联系了Eurekalog支持人员:这是对资源泄漏的虚假肯定(不是我的书名所说的内存泄漏)。 Eurekalog did not report a memory leak but a resource leak,sorry for the confusion and thanks for the help (especially the suggestion of a false positive). Eurekalog并未报告内存泄漏,而是报告了资源泄漏,对于造成混乱的情况表示抱歉,并感谢您的帮助(尤其是关于误报的建议)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM