I'm using a SAX parser in visual C++ in order to read an xml file, but
when my application crashes are detected memory leaks. All the elements
of the xml file appear like a memory leak.
The function that creates the SAXParser is like this:
CMySaxHandler errHandler;
CSaxHandlerEspecificacio advHandler;
CString msg;
int nRetorn;
advHandler.Init(this);
XMLPlatformUtils::Initialize();
SAXParser parser;
SAXParser::ValSchemes valScheme = SAXParser::Val_Always;
parser.setDoValidation(true); // optional
parser.setValidationScheme(valScheme) ;
parser.setDoSchema(true);
parser.setDoNamespaces(true); // optional
parser.setValidationSchemaFullChecking(true);
parser.setErrorHandler(&errHandler);
parser.installAdvDocHandler(&advHandler);
try
{
parser.parse(m_strEspFile);
}
catch (const XMLException& toCatch)
{
......
}
XMLPlatformUtils::Terminate();
I would know what is the problem, because I undertand that the function
Terminate delete all the memory used by the parser.
Thanks in Advance
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]