Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
None
-
None
-
None
-
The Xerces-C++ webpage
Description
In the example code snippet at
http://xerces.apache.org/xerces-c/program-sax.html
there's a fragment as follows:
void MySAXHandler::fatalError(const SAXParseException& exception)
{
char* message = XMLString::transcode(exception.getMessage());
cout << "Fatal Error: " << message
<< " at line: " << exception.getLineNumber()
<< endl;
}
This seems to contradict the claim in XMLString.hpp that the caller of XMLString::transcode() is responsible for freeing the memory.
If there's some reason why this is OK there, it should be clearly stated. Especially as this is a basic hello-world-like example lots of people will presumably start with - and now it might be understood as "Oh, that's not really so important to free this memory, you know."
Attachments
Issue Links
- relates to
-
XERCESC-331 Output of XMLString::transcode not freed?
- Closed