Closing the XmlTextReader


Closing the XmlTextReader

The XmlTextReader should be explicitly closed whenever possible. Explicitly closing it will free up any resources that may be in use while reading the stream. These could be file handles, Web response streams, sockets, or just plain string data. Letting the XmlTextReader go out of scope is not an acceptable way to free up these resources. Besides, explicitly closing the reader is a deterministic way to free up resources. That means there is no reason to guess when resources are available or to attempt to program around resources that are stuck in limbo.



Microsoft.NET Compact Framework Kick Start
Microsoft .NET Compact Framework Kick Start
ISBN: 0672325705
EAN: 2147483647
Year: 2003
Pages: 206

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net