Kosaraju Karuna-C9013Z wrote:
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,
...
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.
Isn't that your function on the top of the stack? Do you do any memory
allocation in it?
If NemiConfigToolInit::characters() isn't your function, then you'd better
ask whoever provided it, because it isn't a Xerces-C function.
Dave