you can get a TAR file of the CVS repository at http://cvs.apache.org/snapshots/xml-xerces/. There is no pre-built package for snapshots, so you will have to build it from the sources.
Thanks, Alberto
At 09.33 26/01/2005 -0500, Wuebben, Anthony E. (LNG-DAY) wrote:
Alberto:
How can we get to the nightly build to test this fix.
Thanks Tony Wuebben
-----Original Message----- From: Alberto Massari (JIRA) [mailto:[EMAIL PROTECTED] Sent: Friday, January 14, 2005 5:42 AM To: [EMAIL PROTECTED] Subject: [jira] Resolved: (XERCESC-490) Memory leak when setCreateEntityReferenceNodes is true
[ http://issues.apache.org/jira/browse/XERCESC-490?page=history ]
Alberto Massari resolved XERCESC-490: -------------------------------------
Assign To: (was: Xerces-C Developers Mailing List) Resolution: Fixed
It turns out that the deprecated DOM was not releasing all the reference counts on the document tree when an entity references were created. I checked in a fix for this (even if it was the deprecated DOM); please verify.
Alberto
> Memory leak when setCreateEntityReferenceNodes is true > ------------------------------------------------------ > > Key: XERCESC-490 > URL: http://issues.apache.org/jira/browse/XERCESC-490 > Project: Xerces-C++ > Type: Bug > Components: DOM > Versions: 1.7.0 > Environment: Operating System: Solaris > Platform: Sun > Reporter: Tony Wuebben
> > I'm running on Solaris 5.7 with xerces 1.7 and I am seeing the following > problem: > My long running applications are leaking what appears to be the entire DOM > tree when setCreateEntityReferenceNodes() is set to true and the XML file > being parsed contains a entity reference. If I turn off the creatation of > entity references or pass in a file that does not contain entity-reference > everything is fine. > Below is a sample of the code that fails. Just give it the below document > that contains an entity-reference and it leaks. > CODE > while(1) { > > try { > fprintf(stderr,"Calling XMLPlatformUtils::Initialize()\n"); > XMLPlatformUtils::Initialize(); > } > catch(const XMLException& toCatch) { > char *cp = XMLString::transcode(toCatch.getMessage()); > fprintf(stderr,"Error during Xerces-c Initialization: [%s]\n",cp); > delete [] cp; > return 1; > } > > DOMParser * _parser = new DOMParser; > > _parser->setDoValidation(false); > _parser->setValidationScheme(DOMParser::Val_Never); > _parser->setCreateEntityReferenceNodes(true); > _parser->setToCreateXMLDeclTypeNode(true); > _parser->setIncludeIgnorableWhitespace(true); > _parser->setDoNamespaces(false); > > _parser->parse(filename); > > delete _parser; > try { > fprintf(stderr,"Calling XMLPlatformUtils::Terminate()\n"); > XMLPlatformUtils::Terminate(); > } > catch(const XMLException& toCatch) { > char *cp = XMLString::transcode(toCatch.getMessage()); > fprintf(stderr,"Error during Xerces-c Termination: [%s]\n",cp); > delete [] cp; > } > } // end forever > exit(0); > } > FILE > <!DOCTYPE foo [ > <!ELEMENT foo (foo1|foo2) > > <!ELEMENT foo1 (#PCDATA)* > > <!ELEMENT foo2 (#PCDATA)* > > <!ENTITY entityfoo "entity-value"> > ]> > <foo><foo1>This a some test data &entityfoo; and more test data > nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn</foo1></foo>
-- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]