Author: mrglavas
Date: Wed May 7 19:37:52 2008
New Revision: 654395
URL: http://svn.apache.org/viewvc?rev=654395&view=rev
Log:
Before returning control to the user, disconnect the schema loader and other
objects from the XMLReader. This should allow for better garbage collection.
Modified:
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Modified:
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
URL:
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=654395&r1=654394&r2=654395&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
(original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Wed May 7 19:37:52 2008
@@ -510,6 +510,15 @@
catch (SAXException se) {
return null;
}
+ // Disconnect the schema loader and other objects from the
XMLReader
+ try {
+ parser.setContentHandler(null);
+ parser.setErrorHandler(null);
+ }
+ // Ignore any exceptions thrown by the XMLReader. Old versions
of SAX
+ // required an XMLReader to throw a NullPointerException if an
attempt
+ // to set a handler to null was made.
+ catch (Exception e) {}
schemaRootDoc = fXSContentHandler.getDocument();
if (schemaRootDoc == null) {
// something went wrong right off the hop
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]