Skip to content

Commit 778b3ed

Browse files
authored
ConfigXmlReader is an IDisposable; Dispose it (#103163)
This was flagged by a static analysis tool. Is this necessary? Is this safe to do?
1 parent 66298c7 commit 778b3ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/AppSettingsSection.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ protected internal override void DeserializeElement(XmlReader reader, bool seria
127127
}
128128
}
129129

130-
ConfigXmlReader internalReader = new ConfigXmlReader(rawXml, sourceFileFullPath, lineOffset);
130+
using ConfigXmlReader internalReader = new ConfigXmlReader(rawXml, sourceFileFullPath, lineOffset);
131131
internalReader.Read();
132132

133133
if (internalReader.MoveToNextAttribute())

0 commit comments

Comments
 (0)