title: will the following xerces code cause a memory leak?
body: <p>I have taken a look at an example i found on the internet of xerces  generating XML. The Transcode function seems to perform some encoding but the buffer it populates to is never released. According to the documentation you must release ti manually: </p>
  
  <blockquote>
    <p>NOTE: The returned buffer is dynamically allocated and is the responsibility of the caller to delete it when not longer needed. You can call XMLString::release to release this returned buffer.</p>
  </blockquote>
  
  <p>could doc->release be releasing this from memory?</p>
  
  <pre><code>    XMLCh tempStr[100];
  
      XMLString::transcode("Range", tempStr, 99);
      DOMImplementation* impl = DOMImplementationRegistry::getDOMImplementation(tempStr, 0);
  
      XMLString::transcode("root", tempStr, 99);
      DOMDocument*   doc = impl-&gt;createDocument(0, tempStr, 0);
      DOMElement*   root = doc-&gt;getDocumentElement();
  
      XMLString::transcode("FirstElement", tempStr, 99);
      DOMElement*   e1 = doc-&gt;createElement(tempStr);
      root-&gt;appendChild(e1);
  
      XMLString::transcode("SecondElement", tempStr, 99);
      DOMElement*   e2 = doc-&gt;createElement(tempStr);
      root-&gt;appendChild(e2);
      doc-&gt;release();
  </code></pre>