我通常使用这种方法来确保所有的http类都被正确处理,并且没有任何东西留在内存中:
HttpWebRequest request = WebRequest.Create("http://xxxx") as HttpWebRequest;
using (HttpWebResponse response = request.GetResponse())
using (Stream stream = response.GetResponseStream())
... do my stuff ...
有更好的主意吗?