You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by sa...@apache.org on 2002/11/10 04:51:43 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/impl/dtd XMLDTDValidator.java
sandygao 2002/11/09 19:51:43
Modified: java/src/org/apache/xerces/impl/dtd XMLDTDValidator.java
Log:
This variable was not reset to 0. It stores the number of child elements of
the current element. Each time the parse finishes, it's value is 1 (because
there is one root element). Without setting it to 0, its value will increase by 1
each time an instance is parsed. It's used as an index to an array. With its
value increasing, the size of that array needs to increase as well, which leads
to some memory leak.
Revision Changes Path
1.40 +2 -1 xml-xerces/java/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java
Index: XMLDTDValidator.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- XMLDTDValidator.java 21 Oct 2002 11:09:40 -0000 1.39
+++ XMLDTDValidator.java 10 Nov 2002 03:51:42 -0000 1.40
@@ -517,6 +517,7 @@
fDatatypeValidatorFactory = (DTDDVFactory)componentManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.DATATYPE_VALIDATOR_FACTORY_PROPERTY);
fElementDepth = -1;
+ fElementChildrenLength = 0;
init();
} // reset(XMLComponentManager)
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org