Question about DOM* class createXXX methods in C++. Do I have to do anything special to free memory returned from DOM* createXXX methods?
For example (the transcodes were removed for simplification and the associated releases for the vars associated with the transcode operations, I know about those):
pImplement = DOMImplementationRegistry::getDOMImplementation("LS");
DOMDocument* pDoc = pImplement->createDocument("Examples", "example", NULL );
DOMElement* pRoot = pDoc->getDocumentElement();
DOMElement* firstElement = pDoc->createElementNS(("Examples", "example");
DOMElement* secondElement = pDoc->createElementNS("Examples", "example2");
DOMAttr* name = pDoc->createAttribute("Name");
XMLCh* somenameValue = XMLString::transcode("Fred");
name->setValue(somenameValue);
secondElement->setAttributeNode(name);
firstElement->appendChild(secondElement);
When I leave the method eventually, do I have to do anything special for firstElement, secondElement, name to free the memory from the createXXX methods? Or does pdoc own all the memory and I have to wait to destroy the DOMDocument?
If adds to the discussion, I loop over the name/value logic and add multiple attributes to the secondElement.
thanks.