积极答复者
Clear 和 Dispose

问题
答案
-
没有必要,因为出了using自动释放资源了。
ASP.NET Forum
Other Discussion Forums
FreeRice Donate
Issues to report
Free Tech Books Search and Download- 已标记为答案 Nicholas Xu 2015年8月20日 17:19
全部回复
-
不需要。
你的Clear应该是Close把?
如果是Close,那么它和Dispose的区别在于:
1)Close关闭了,不一定把资源给全部释放,意味着你可以通过Reset或者其它某个方法重新初始化重新复用。
2)Dispose彻底把这个类资源释放(不可以复用)。
ASP.NET Forum
Other Discussion Forums
FreeRice Donate
Issues to report
Free Tech Books Search and Download -
没有必要,因为出了using自动释放资源了。
ASP.NET Forum
Other Discussion Forums
FreeRice Donate
Issues to report
Free Tech Books Search and Download- 已标记为答案 Nicholas Xu 2015年8月20日 17:19