xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrgla...@apache.org
Subject svn commit: r654398 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSAnnotationImpl.java
Date Thu, 08 May 2008 03:09:31 GMT
Author: mrglavas
Date: Wed May  7 20:09:30 2008
New Revision: 654398

URL: http://svn.apache.org/viewvc?rev=654398&view=rev
Log:
Before returning control to the user, disconnect the user's ContentHandler
from the SchemaGrammar's XMLReader. This should allow for better garbage 
collection.

Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSAnnotationImpl.java

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSAnnotationImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSAnnotationImpl.java?rev=654398&r1=654397&r2=654398&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSAnnotationImpl.java
(original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSAnnotationImpl.java
Wed May  7 20:09:30 2008
@@ -134,13 +134,17 @@
         parser.setContentHandler(handler);
         try {
             parser.parse(aSource);
-        } catch (SAXException e) {
+        } 
+        catch (SAXException e) {
             // this should never happen!
             // REVISIT:  what to do with this?; should really not
             // eat it...
-        } catch (IOException i) {
+        } 
+        catch (IOException i) {
             // ditto with above
         }
+        // Release the reference to the user's ContentHandler.
+        parser.setContentHandler(null);
     }
 
     // this creates the new Annotation element as the first child



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org


Mime
View raw message