You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Houle, Dennis W" <De...@West.Boeing.com> on 2001/09/12 21:18:58 UTC

IDOM memory management

Team Xerces-C,
As I understand memory management in IDOM, the IDOM_Document allocates heap
memory for XMLCh* returned from such methods as IDOM_Element::getAttribute
and does not deallocate heap memory until the IDOM_Document destructor is
called.

So does this mean that the heap will grow unbounded if
IDOM_Element::getAttribute is called repeatedly?

Thanks much.


Dennis W. Houle
The Boeing Company
(714) 762-0291
(714) 762-2253 (fax)
dennis.w.houle@boeing.com



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: IDOM memory management

Posted by Tinny Ng <tn...@ca.ibm.com>.
> So does this mean that the heap will grow unbounded if
> IDOM_Element::getAttribute is called repeatedly?

Not really.  Normally the getAttribute just return the same text value that is
already saved inside the node.  It doesn't allocate a new memory for the XMLCh*
returned.

Tinny

"Houle, Dennis W" wrote:

> Team Xerces-C,
> As I understand memory management in IDOM, the IDOM_Document allocates heap
> memory for XMLCh* returned from such methods as IDOM_Element::getAttribute
> and does not deallocate heap memory until the IDOM_Document destructor is
> called.
>
> So does this mean that the heap will grow unbounded if
> IDOM_Element::getAttribute is called repeatedly?
>
> Thanks much.
>
> Dennis W. Houle
> The Boeing Company
> (714) 762-0291
> (714) 762-2253 (fax)
> dennis.w.houle@boeing.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org