C# 编码的双重检验锁定
摘要:
// Port to C# class Singleton { public static Singleton Instance() { if (_instance == null)//提高效率 { lock (typeof(Singleton)) { if (_instance == null) //防止多次创建单例对象 { _instance = new ... 阅读全文
posted @ 2009-06-22 18:42 ATAK 阅读(856) 评论(1) 推荐(0) 编辑