您的位置:首页 > 编程语言 > ASP

教你50招提升ASP.NET性能(九):显式的使用using语句减少内存泄露

2013-07-15 13:31 405 查看
(15)Reduce memory leaks dramatically with the “using” statement

招数15:

显式的使用using语句减少内存泄露

If a type implements IDisposable, wrap the use of it in a “using” statement, so that it automatically disposes of objects properly when the block exits.
如果一个类实现了IDisposable接口,使用using语句包裹这个类型,以便离开语句块就能自动的释放恰当的对象。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐