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 ji...@apache.org on 2004/05/14 18:12:56 UTC
[jira] Commented: (XERCESC-1213) delete XercesDOMParser object does not release memory under Sun Solaris
The following comment has been added to this issue:
Author: Alberto Massari
Created: Fri, 14 May 2004 9:11 AM
Body:
The syntax
delete m_pParser, m_pParser = 0;
seems suspicious to me; I cannot check with the C++ grammar book, but it could be the case that the Solaris compiler throws away the "delete m_pParser" part of the statement.
Try with a more standard
delete m_pParser;
m_pParser = 0;
Alberto
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/XERCESC-1213?page=comments#action_35557
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCESC-1213
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCESC-1213
Summary: delete XercesDOMParser object does not release memory under Sun Solaris
Type: Bug
Status: Unassigned
Priority: Critical
Project: Xerces-C++
Components:
Non-Validating Parser
Versions:
2.3.0
Assignee:
Reporter: Kirill Shiff
Created: Fri, 14 May 2004 9:05 AM
Updated: Fri, 14 May 2004 9:11 AM
Environment: Sun Solaris Xerces 2.3
Description:
For following example Xerces does not release memory by delete m_pParser (nother by Terminate()) . It happends on Sun Solaris. Under windows it works OK.
however for i > 0 there is no allocated memory increase...
XMLPlatformUtils::Initialize();
for(long i = 0; i < 5; i++)
{
DOMNode* m_pRoot = 0;
DOMDocument* m_pDOMDocument = 0;
XercesDOMParser* m_pParser = new XERCES_CPP_NAMESPACE_QUALIFIER XercesDOMParser();
m_pParser->setDoNamespaces(true);
m_pParser->setValidationScheme(AbstractDOMParser::Val_Auto);
m_pParser->setExpandEntityReferences(false);
m_pParser->setIncludeIgnorableWhitespace(false);
m_pParser->useCachedGrammarInParse(false);
m_pParser->parse(xmlFile);
m_pDOMDocument = m_pParser->getDocument();
....
m_pRoot = m_pDOMDocument->getFirstChild();
m_pParser->resetDocumentPool();
m_pParser->resetCachedGrammarPool();
delete m_pParser, m_pParser = 0;
}
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