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 Bhushan Khanal <bh...@wrq.com> on 2002/01/29 21:42:58 UTC

Possible mem leak on getElementsByTagName

My memory manager is complaining that getElementsByTagName() is causing
couple of memory leaks. The archive suggests that there have been fixes for
similar memory leaks
(http://marc.theaimsgroup.com/?l=xerces-c-dev&m=100212612816886&w=2). I was
under the impression that those changes made it into 1.6.0 release? 

My understanding of iDOM interface was that there is no need to free any of
these internal structures and they will be freed when the document is
released. Am I missing anything? I have included some details of my
environment and also call stacks as reported by the memory manager. 

Thanks,
Bhushan Khanal

Environment
----------------
* Using the IDOM interfaces
* Using pre-built binaries
* Xerces 1.6.0 Shipping Version
* Using the code in a Win32 environment

Stack 1 
------------
 new(UINT)      [MSVCRT.dll]
 IDDocumentImpl::getDeepNodeList(IDOM_Node const*,WORD const*)
[xerces-c_1_6_0.dll]
 IDOM_NodeList*  constants=xmlDoc->getElementsByTagName(L"Constant")
[myCode]

Stack 2
------------
 new(UINT)      [MSVCRT.dll]
 XMLString::replicate(WORD const* const) [xerces-c_1_6_0.dll]
 IDOM_NodeList*  constants=xmlDoc->getElementsByTagName(L"Constant")
[myCode]

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


Re: Possible mem leak on getElementsByTagName

Posted by Tinny Ng <tn...@ca.ibm.com>.
I think you've found some valid leaks  .... Can you please open a bugzilla bug
to track this problem (see http://xml.apache.org/xerces-c/bug-report.html)?   I
will update you once the fix is ready.

Thanks!

Tinny

Bhushan Khanal wrote:

> My memory manager is complaining that getElementsByTagName() is causing
> couple of memory leaks. The archive suggests that there have been fixes for
> similar memory leaks
> (http://marc.theaimsgroup.com/?l=xerces-c-dev&m=100212612816886&w=2). I was
> under the impression that those changes made it into 1.6.0 release?
>
> My understanding of iDOM interface was that there is no need to free any of
> these internal structures and they will be freed when the document is
> released. Am I missing anything? I have included some details of my
> environment and also call stacks as reported by the memory manager.
>
> Thanks,
> Bhushan Khanal
>
> Environment
> ----------------
> * Using the IDOM interfaces
> * Using pre-built binaries
> * Xerces 1.6.0 Shipping Version
> * Using the code in a Win32 environment
>
> Stack 1
> ------------
>  new(UINT)      [MSVCRT.dll]
>  IDDocumentImpl::getDeepNodeList(IDOM_Node const*,WORD const*)
> [xerces-c_1_6_0.dll]
>  IDOM_NodeList*  constants=xmlDoc->getElementsByTagName(L"Constant")
> [myCode]
>
> Stack 2
> ------------
>  new(UINT)      [MSVCRT.dll]
>  XMLString::replicate(WORD const* const) [xerces-c_1_6_0.dll]
>  IDOM_NodeList*  constants=xmlDoc->getElementsByTagName(L"Constant")
> [myCode]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org