You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Alberto Massari <am...@datadirect.com> on 2006/06/13 12:13:50 UTC
Re: Xerces-C++, getTextContent has memory growth problem with
long text.
At 14.39 12/06/2006 -0700, Naomi Nguyen wrote:
>Hi Alberto and users,
>There is a memory growth problem with const XMLCh *getTextContent()
>when text content is more than 4k in length.
>When this function is called 5,000 times, there is no memory left.
>
> char *textStr = XMLString::transcode((*aNode)->getTextContent());
> XMLString::release(&textStr);
>
>Is it a known bug ? Is there any other function similar to
>getTextContent() and does not have memory growth problem ?
Hi Naomi,
getTextContent allocates the memory from the memory pool of the
DOMDocument, so the memory rise is by design (it will be released
when the DOM tree will be deleted)
Alberto