Hi,
 
We have a tool to parse the XML file with Xerces SAX parser. Our tool
provides two APIs, initialize() and terminate().
In the initialize method, we have the following piece of code
XMLPlatformUtils::Initialize(); followed by,

pParser=3DXMLReaderFactory::createXMLReader();

pParser->setFeature(XMLUni::fgSAX2CoreValidation, false); 

pParser->setFeature(XMLUni::fgXercesDynamic, false); 

pParser->setFeature(XMLUni::fgXercesSchema, false); 

pParser->setFeature(XMLUni::fgXercesSchemaFullChecking,false);

pParser->setContentHandler(this);

pParser->setErrorHandler(this);

 pParser->parse(pXmlFile);

 And in terminate we have the following piece of code
 

delete pParser;

XMLPlatformUtils::terminate();

 

But the purify application still shows the leaks even after deleting the
parser. Pls see below for the purify pointed memory leak

MLK: 96 bytes leaked in 6 blocks
  * This memory was allocated from:
 malloc         [rtlib.o]
 NemiConfigToolInit::characters(unsigned short const*, unsigned)
[NemiConfigToolInit.cpp:1144]
 xercesc_2_6::SAX2XMLReaderImpl::docCharacters(unsigned short const*,
unsigned, bool) [SAX2XMLReaderImpl.cpp:777]
 xercesc_2_6::IGXMLScanner::sendCharData(xercesc_2_6::XMLBuffer&)
[IGXMLScanner2.cpp:1461]
 xercesc_2_6::IGXMLScanner::scanCharData(xercesc_2_6::XMLBuffer&)
[IGXMLScanner2.cpp:2808]
 xercesc_2_6::IGXMLScanner::scanContent() [IGXMLScanner.cpp:836]
  * Block of 16 bytes (6 times); last block at 0x81323f0


Are we missing something here? Since we have alredy deleted the parser,
all the memory occupied by parser should get released.

Let me know your thoughts.

 

Thanks

Karuna

Reply via email to