Hi Alberto,

Alberto Massari <[email protected]> writes:

> It turns out that getWholeText doesn't use the pooled memory manager of 
> DOMDocument, but simply the memory manager. So you have to call  
> XMLString::release on the returned pointer.
>
> At this point the doubt is: should we fix the documentation, or the  
> code? Because, if we fix the code, we are going to break existing code  
> that does the right thing and releases the pointer.... Boris, David,  
> Michael (and others), what do you think?

I think we should fix the code to allocate the buffer in the DOM
document's heap. This will be consistent with other similar functions
(e.g., getData()) as well as with the return type (const XMLCh* instead
of XMLCh*).

Boris

-- 
Boris Kolpackov, Code Synthesis        http://codesynthesis.com/~boris/blog
Compiler-based ORM system for C++      http://codesynthesis.com/products/odb
Open-source XML data binding for C++   http://codesynthesis.com/products/xsd
XML data binding for embedded systems  http://codesynthesis.com/products/xsde

Reply via email to