+ use XMLString::release to free memory
This commit is contained in:
parent
b316991220
commit
a5c8529b53
|
@ -1055,7 +1055,7 @@ void ParameterManager::Init(void)
|
|||
err << "Error during Xerces-c Initialization.\n"
|
||||
<< " Exception message:"
|
||||
<< pMsg;
|
||||
delete [] pMsg;
|
||||
XMLString::release(&pMsg);
|
||||
throw Exception(err.str().c_str());
|
||||
}
|
||||
Init = true;
|
||||
|
@ -1441,7 +1441,7 @@ bool DOMPrintErrorHandler::handleError(const DOMError &domError)
|
|||
// Display whatever error message passed from the serializer
|
||||
char *msg = XMLString::transcode(domError.getMessage());
|
||||
std::cout<<msg<<std::endl;
|
||||
delete[] msg;
|
||||
XMLString::release(&msg);
|
||||
|
||||
// Instructs the serializer to continue serialization if possible.
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user