vincent
vincent

Reputation: 78

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

Upvotes: 0

Views: 212

Answers (1)

vincent
vincent

Reputation: 78

I contacted Eurekalog support: it was a false positive of a RESOURCE leak (not a memory leak as my title says). 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).

Upvotes: 0

Related Questions