Hi,
I have a memory leak problem in my program. The memory leak seems to be caused
by the XMLString::transcode, after which I fail to release memory correctly.
This is how I use it:
DOMNode* sysChild;
char* sysChildName;
String nodeName;
...
for(int i=0; i<sysElemChildren->getLength(); i++)
{
sysChild = sysElemChildren->item(i);
sysChildName = XMLString::transcode(sysChild->getNodeName());
nodeName = String(sysChildName);
...
}
XMLString::release(&sysChildName);
As you can guess from the code I need to retrieve the name of the node as a
String. I thought that with the release memory would be released/freed, but it
does not seem to be the case.
Has any of you encounter the same problem? Could you please tell me how could I
obtain the node name as a String and release the memory to avoid the leak?
I would really appreciate any help, I have to parse a very big XML file, so
little problems like this one become huge!!!
Thank you very much in advance.
Cheers,
Marian.