xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Kolpackov <bo...@codesynthesis.com>
Subject Re: MemoryLeaks in Xerces
Date Tue, 30 Jan 2007 07:17:36 GMT
Hi,

"Kosaraju Karuna-C9013Z" <C9013Z@motorola.com> writes:


> -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 the terminate API call, we do invoke
>
> XMLPlatformUtils::terminate()
>
> When we just invoke initialize and terminate, we do see some memory
> leaks.

Perhaps you should also release the parser somewhere. E.g., add

delete pParser;

before

XMLPlatformUtils::terminate();


hth,
-boris


-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding


Mime
View raw message