diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2004-04-05 13:32:48 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2004-04-05 13:32:48 +0400 |
commit | b123e6f7c5e8adf6f31cabeb11a2ccf372f19798 (patch) | |
tree | d4d55ba3d5b447abff702da64262d8b00e3a2c15 /mcs/class/System.XML/System.Xml/DTDObjectModel.cs | |
parent | f9602f964e85cb13e1af01accb8121e0e89a9e70 (diff) |
2004-04-05 Atsushi Enomoto <atsushi@ximian.com>
* DTDObjectModel.cs : (DTDAttributeDefinition) create ArrayList
only when they are required.
* DTDReader.cs,
XmlParserInput.cs : raw tag string now don't have to be kept, while
it cost so much. Removed unused code. 20% to 30% memory got saved.
* XmlNotation.cs : removed unused code.
* XmlTextReader.cs : Removed unused code. ReadString() now uses
XmlReader's internal method. Fixed BaseURI to be conformant with
W3C XML InfoSet and (subsequently) xml:base specification (i.e.
reflect xml:base attribute correctly).
svn path=/trunk/mcs/; revision=25026
Diffstat (limited to 'mcs/class/System.XML/System.Xml/DTDObjectModel.cs')
-rw-r--r-- | mcs/class/System.XML/System.Xml/DTDObjectModel.cs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mcs/class/System.XML/System.Xml/DTDObjectModel.cs b/mcs/class/System.XML/System.Xml/DTDObjectModel.cs index 7ccf3239600..38ee35656d6 100644 --- a/mcs/class/System.XML/System.Xml/DTDObjectModel.cs +++ b/mcs/class/System.XML/System.Xml/DTDObjectModel.cs @@ -563,9 +563,9 @@ namespace Mono.Xml { string name; XmlSchemaDatatype datatype; - ArrayList enumeratedLiterals = new ArrayList (); + ArrayList enumeratedLiterals; string unresolvedDefault; - ArrayList enumeratedNotations = new ArrayList (); + ArrayList enumeratedNotations; DTDAttributeOccurenceType occurenceType = DTDAttributeOccurenceType.None; string resolvedDefaultValue; string resolvedNormalizedDefaultValue; @@ -595,11 +595,19 @@ namespace Mono.Xml // Then I decided to use string ArrayList for enumerated values, // and unresolved string value for DefaultValue. public ArrayList EnumeratedAttributeDeclaration { - get { return this.enumeratedLiterals; } + get { + if (enumeratedLiterals == null) + enumeratedLiterals = new ArrayList (); + return this.enumeratedLiterals; + } } public ArrayList EnumeratedNotations { - get { return this.enumeratedNotations; } + get { + if (enumeratedNotations == null) + enumeratedNotations = new ArrayList (); + return this.enumeratedNotations; + } } public string DefaultValue { |