On Tue, 19 Nov 2002, Bagepalli, Kiran wrote: > Following up on the question, if the element data and attributes are string > pooled, are they reference counted as well. > > Say I have a DOM Tree, two parts of a DOM tree use data from the string > pool. If I release the first part, is the pool clever enough to retain the > strings in the pool. If the second part is deleted, are the strings in the > string pool marked to be reused.
Strings are not reclaimed or marked as reusable. > > This is important because, if I release all nodes using some strings in the > string pool, they should be reclaimed. > My question is, is the string pool always growing as long as the DOM > document stays alive. Yes it is. > > As another example, lets assume I build a DOM, maybe 20MB element data in > memory. Do you intend to say, if I release all nodes, except the root > node(document), my memory usage will still show 20MB. Are there any > functions to reduce the block size or reclaim memory. No, no currently. When you next create elements/attrs the actual DOMElement and DOMAttr objects will not increase your memory usage because they will come from the block of memory that has been marked for reuse. Gareth -- 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]
