xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiang lei" <jiang-...@8107.co.jp>
Subject DOMNodeList memory allocation?
Date Fri, 04 Jul 2003 00:53:06 GMT
Hi everybody,

Everytime I use the method DOMNode::getElementsByTagname() I am quite
worried about the memory allocation. That method returns a pointer to
DOMNodeList, which stores node pointers in a temporary place.

So it came to me like there are possibly 2  pattern for the making of  a

1. the newly created DOMNodeList takes memory from a memory pool or register
itself to a memory manager. When the node or document is released,
corresponding DOMNodeList will be destructed as well.

2. there can only be 1 instance of a DOMNodeList at a time for each DOMNode.
Each time you use getElementsByTagname(), the old will be gone and a new
list will be created in its place.

Am I right? Or is there another pattern?

Thanks a lot for your attention.

Best Regards


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

View raw message