You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by xe...@xml.apache.org on 2004/08/25 11:06:20 UTC
[jira] Commented: (XERCESC-1260) Memory not released with DOMBuilder::parse() method
The following comment has been added to this issue:
Author: Gareth Reakes
Created: Wed, 25 Aug 2004 2:05 AM
Body:
There was a bug a while back. Try upgrading to a new version. With questions like this its better to ask on the list - you will get a better response.
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/XERCESC-1260?page=comments#action_37443
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCESC-1260
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCESC-1260
Summary: Memory not released with DOMBuilder::parse() method
Type: Bug
Status: Unassigned
Priority: Major
Project: Xerces-C++
Components:
DOM
Versions:
2.3.0
Assignee:
Reporter: Rev Glen Saldanha
Created: Mon, 23 Aug 2004 4:47 AM
Updated: Wed, 25 Aug 2004 2:05 AM
Environment: Window 2000
Description:
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();
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org