xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrgla...@apache.org
Subject svn commit: r654399 - /xerces/java/trunk/src/org/apache/xerces/impl/xs/XSAnnotationImpl.java
Date Thu, 08 May 2008 03:10:15 GMT
Author: mrglavas
Date: Wed May  7 20:10:15 2008
New Revision: 654399

URL: http://svn.apache.org/viewvc?rev=654399&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/trunk/src/org/apache/xerces/impl/xs/XSAnnotationImpl.java

Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XSAnnotationImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/XSAnnotationImpl.java?rev=654399&r1=654398&r2=654399&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/XSAnnotationImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/XSAnnotationImpl.java Wed May  7 20:10:15
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