cargilld 2005/01/18 11:09:20 Modified: c/samples/SCMPrint SCMPrint.cpp Log: Delete memory for parser and grammarpool. Fix from Steve Dulin. Revision Changes Path 1.7 +11 -4 xml-xerces/c/samples/SCMPrint/SCMPrint.cpp Index: SCMPrint.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/samples/SCMPrint/SCMPrint.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- SCMPrint.cpp 12 Jan 2005 21:00:47 -0000 1.6 +++ SCMPrint.cpp 18 Jan 2005 19:09:20 -0000 1.7 @@ -16,6 +16,9 @@ /* * $Log$ + * Revision 1.7 2005/01/18 19:09:20 cargilld + * Delete memory for parser and grammarpool. Fix from Steve Dulin. + * * Revision 1.6 2005/01/12 21:00:47 cargilld * Fix for xercesc-1219. * @@ -282,17 +285,19 @@ return 1; } + XMLGrammarPool *grammarPool; + SAX2XMLReaderImpl* parser; try { - XMLGrammarPool *grammarPool = new XMLGrammarPoolImpl(XMLPlatformUtils::fgMemoryManager); + grammarPool = new XMLGrammarPoolImpl(XMLPlatformUtils::fgMemoryManager); - SAX2XMLReaderImpl* parser = new SAX2XMLReaderImpl(XMLPlatformUtils::fgMemoryManager, grammarPool); + parser = new SAX2XMLReaderImpl(XMLPlatformUtils::fgMemoryManager, grammarPool); parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, true); parser->setFeature(XMLUni::fgXercesSchema, true); parser->setFeature(XMLUni::fgXercesSchemaFullChecking, schemaFullChecking); parser->setFeature(XMLUni::fgSAX2CoreNameSpacePrefixes, false); - parser->setFeature(XMLUni::fgSAX2CoreValidation, true); - parser->setFeature(XMLUni::fgXercesDynamic, true); + parser->setFeature(XMLUni::fgSAX2CoreValidation, true); + parser->setFeature(XMLUni::fgXercesDynamic, true); parser->setProperty(XMLUni::fgXercesScannerName, (void *)XMLUni::fgSGXMLScanner); SCMPrintHandler handler; @@ -398,6 +403,8 @@ errorCode = 5; } + delete parser; + delete grammarPool; XMLPlatformUtils::Terminate(); return errorCode;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]