Hi, 
An element allocates a DOMAttrMapImpl that is not part of the element
and is owned by the document. This will not be released when release is
called. I believe this is what you what you are seeing. I know no way of 
releasing this memory without destroying the document.

Gareth

On Mon, 11 Nov 2002, Stannard, Andrew wrote:

> Hi All,
> 
> I tracked a memory leak in a program I am writing down to the equivalent of
> the following two lines of code.
> 
> DOMElement* newElement = DOMDocument->createElement(X("NodeName"));
> newElement->release();
> 
> I had assumed that creating and element and subsequently releasing that
> element would be memory neutral, however I found when looping those two
> lines as a test my memory allocation grows without bound. The string
> trancode function is not the problem, I tested that.
> 
> Is there another function I could call to delete/clean up an element?
> 
> I worked around the problem by creating a new document, copying the contents
> over with import, and releasing the old document, but it would be nice to be
> able to release a single node.
> 
> Thx,
> Andrew
> 

-- 
Gareth Reakes, Head of Product Development  
DecisionSoft Ltd.            http://www.decisionsoft.com
Office: +44 (0) 1865 203192



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to