(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语句包裹这个类型,以便离开语句块就能自动的释放恰当的对象。

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

  1. 教你50招提升ASP.NET性能(十六):把问题仍给硬件而不是开发人员

    (27)Throw hardware at the problem, not developers 招数27: 把问题仍给硬件而不是开发人员 As developers, we often want ...

  2. 教你50招提升ASP.NET性能(十四):使用startMode属性来减少ASP.NET站点加载时间

    (25)Use the startMode attribute to reduce the load time for your ASP.NET site 招数25: 使用startMode属性来减少 ...

  3. 教你50招提升ASP.NET性能(二十六):对于开发人员的数据库性能技巧

    Database Performance Tips for Developers对于开发人员的数据库性能技巧 As a developer you may or may not need to go ...

  4. 教你50招提升ASP.NET性能(十一):避免在调试模式下运行网站

    (17)Avoid running sites in debug mode 招数17: 避免在调试模式下运行网站 When it comes to ASP.NET, one of the most c ...

  5. 教你50招提升ASP.NET性能(七):总是在服务器端执行验证

    (13)Always perform validation on the server as well 招数13: 总是在服务器端执行验证 This isn’t exactly a performan ...

  6. 教你50招提升ASP.NET性能(二):移除不用的视图引擎

    (2)Remove unused View Engines 招数2: 移除不用的视图引擎 If you're an ASP.NET MVC developer, you might not know ...

  7. 教你50招提升ASP.NET性能(二十四):ORM小窍门

    ORM TipsORM小窍门 More and more people are using Object to Relational Mapping (ORM) tools to jump the d ...

  8. 教你50招提升ASP.NET性能(二十一):避免使用会话状态

    (39)Avoid using session state 招数39: 避免使用会话状态 Where possible, you should try and avoid using session ...

  9. 教你50招提升ASP.NET性能(二十):7条便利的ViewState技巧

    (32)Seven handy ViewState tips 招数32: 7条便利的ViewState技巧 Every time I have to deal with a classic ASP.N ...

  10. 教你50招提升ASP.NET性能(十九):静态集合

    (30)Static collections 招数30: 静态集合 If a collection is static, make sure it only contains the objects ...

随机推荐

  1. Flex 选项卡加载方式简介

    Flex中选项卡默认只加载选中的选项,所以在初始化的时候给其他的选项卡中的对象赋值或是其他操作,都会出现空对象错误. 解决办法:给选项卡设置属性 creationPolicy=”all” 如:< ...

  2. NFC(11)MifareUltralight格式规范及读写示例

    注意 MifareUltralight 不支三种过滤方式之一,只支持第四种(用代码,activity singleTop ) 见  NFC(4)响应NFC设备时启动activity的四重过滤机制 Mi ...

  3. Wince6 RIL层移植

    RIL移植: 因为不同的模组,支持的AT命令有所不同,或是格式不一样,还有就是返回不一样,我们有必要对不同的模组进行RIL驱动移植. 在Response.cpp,Msg.cpp等 文件中ParseXX ...

  4. mac terminal终端ls命令参数详解

    原文:https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/ls.1.html -a ...

  5. Codeforces Round #228 (Div. 2) C. Fox and Box Accumulation(贪心)

    题目:http://codeforces.com/contest/389/problem/C 题意:给n个箱子,给n个箱子所能承受的重量,每个箱子的重量为1: 很简单的贪心,比赛的时候没想出来.... ...

  6. Jquery动画第一部分

    效果图: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.asp ...

  7. poj2月题解

    竟然生日前一天poj破百,不错不错,加速前进! poj2437 由于泥泞不重叠,所以按其实左边排个序再统计一遍即可(如果不是刚好盖满就尽量往后盖) poj2435 细节bfs poj2230 求欧拉回 ...

  8. Unity3D中使用3DMAX建模规范

    1.将3Dmax中的单位制设置为厘米.  如果使用3DMax来建模的话,可将3DMax的系统默认单位改成厘米 〉Customize - Units Setup - Metric - Display U ...

  9. Java泛型类与类型擦除

    转载自:http://blog.csdn.net/lonelyroamer/article/details/7868820 一.Java泛型的实现方法:类型擦除 前面已经说了,Java的泛型是伪泛型. ...

  10. [转] Attach、Detach和DeleteObject

    原文:Attach.Detach和DeleteObject,想飞的梦想 1.CWnd Attatch和Detach的关系 首先,要明白Windows对象和MFC对象的区别. MFC对象实际上并没有把整 ...