[ 
http://issues.apache.org/jira/browse/XERCESC-1260?page=comments#action_12414053 
] 

Rinil Baxi commented on XERCESC-1260:
-------------------------------------

Hi,

I am using Xercesc Parser 2.4.0.
The problem (XERCESC-1260 : Memory not released with DOMBuilder::parse() 
method) persists with the version I am using.
Please guide me,  How I can resolve this problem in 2.4.0.

I am not able to use the latest versions due to some production problems.

Kindly reply as soon as possible.

Thanks and Best Regards,
Rinil

> Memory not released with DOMBuilder::parse() method
> ---------------------------------------------------
>
>          Key: XERCESC-1260
>          URL: http://issues.apache.org/jira/browse/XERCESC-1260
>      Project: Xerces-C++
>         Type: Bug

>   Components: DOM
>     Versions: 2.3.0
>  Environment: Window 2000
>     Reporter: Rev Glen Saldanha

>
> Hi All,
> I have a problem with DOMBuilder::parse() as when this method is called it 
> consume a lot of memory. When the DOMBuilder::resetDocumentPool() is called 
> all the memory taken up by the parse() method is not getting released. The 
> code is given below. Any suggestions are always welcomed.
> The pseudo-code:
>  XMLCh tempStr[100];
>  XMLString::transcode("LS", tempStr, 99);
>  XMLPlatformUtils::Initialize();
>  DOMBuilder  *m_pParser = 0;
>  DOMImplementation *m_DOMImplementation = 
> DOMImplementationRegistry::getDOMImplementation(tempStr);
>   
>  if (m_pParser == 0) {
>       m_pParser = (
>         (DOMImplementationLS*)m_DOMImplementation)->createDOMBuilder(
>                                             
> DOMImplementationLS::MODE_SYNCHRONOUS, 0);
>   }
>   if (m_pParser != 0) {
>     m_pParser->setFeature(XMLUni::fgDOMNamespaces,            doNamespaces);
>     m_pParser->setFeature(XMLUni::fgXercesSchema,             doSchema);
>     m_pParser->setFeature(XMLUni::fgXercesSchemaFullChecking, 
> schemaFullChecking);
>     m_pParser->setFeature(XMLUni::fgDOMValidateIfSchema,      true);
>     m_pParser->setFeature(XMLUni::fgDOMDatatypeNormalization, false);
>     m_pParser->resetDocumentPool();
>     m_pParser->setFeature(XMLUni::fgXercesLoadExternalDTD,    true);
>   }
>   const XMLByte *pXmlByte = (XMLByte *) strSource.data() ; //Some Data
>   {
>     MemBufInputSource  *pInputSource = new MemBufInputSource(pXmlByte, 
> strSource.size(),(char*)0);
>     Wrapper4InputSource InputSourceWrapper(pInputSource);
>     m_pDOMDocument = m_pParser->parse(InputSourceWrapper); //This is leaking 
> a lot
>   }
>   if(m_pParser != 0)
>   {
>       m_pParser->resetDocumentPool();
>       m_pParser->release();
>   }
>   XMLPlatformUtils::Terminate();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to