G
Guest
We coded our own stand-in for System.ConfigurationSettings that is using and
XmlReader to pull in the key/value pairs from the
configuration\appSettings\add elements in the .config file, and add them to a
NameValueCollection. CLR Profiler tells me that XmlReader is allocating a
64K System.Byte[] that seems to survive garbage collection for the life of
the application. So I put together a simple repro that on button_click just
instantiaties an XmlTextReader, passing it a new FileStream, and then
immediately closes the XmlTextReader, allowing it to go out of scope, and
thus it and its resources should get garbage collected... CLR Profiler still
shows a 64K System.Byte[] that lives for the life of the application. A GC
Heap snapshot from remote performance monitor shows it in red as
[root: Static (Sytem.Xml.XmlCharType)] System.Byte[](Size: 65548 Bytes, ID:
0x00038007)
Can anyone shed light?
XmlReader to pull in the key/value pairs from the
configuration\appSettings\add elements in the .config file, and add them to a
NameValueCollection. CLR Profiler tells me that XmlReader is allocating a
64K System.Byte[] that seems to survive garbage collection for the life of
the application. So I put together a simple repro that on button_click just
instantiaties an XmlTextReader, passing it a new FileStream, and then
immediately closes the XmlTextReader, allowing it to go out of scope, and
thus it and its resources should get garbage collected... CLR Profiler still
shows a 64K System.Byte[] that lives for the life of the application. A GC
Heap snapshot from remote performance monitor shows it in red as
[root: Static (Sytem.Xml.XmlCharType)] System.Byte[](Size: 65548 Bytes, ID:
0x00038007)
Can anyone shed light?